Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxGanttControlTaskPredecessorLinks.GetItemByPredecessorUID(Integer) Method

Returns a dependency by its predecessor’s unique identifier.

#Declaration

Delphi
function GetItemByPredecessorUID(const AUID: Integer): TdxGanttControlTaskPredecessorLink;

#Parameters

Name Type
AUID Integer

#Returns

Type
TdxGanttControlTaskPredecessorLink

#Remarks

Predecessor task is a task that a dependency links with succeeding task(s).

Call this function and pass a predecessor tasks’s unique identifier to obtain all dependencies that belong to this task. Otherwise, the functuion resturns nil.

The code example below shows how you can change type of multiple dependecies that have the same predecessor:

var
  ADependency: TdxGanttControlTaskPredecessorLink;
  ACollection: TdxGanttControlTaskPredecessorLinks;
  I: Integer;
begin
  for I := 0 to dxGanttControl1.DataModel.Tasks.Count - 1 do
  begin
    ACollection := dxGanttControl1.DataModel.Tasks.Items[I].PredecessorLinks;
    ADependency := ACollection.GetItemByPredecessorUID(1);
    if ADependency <> nil then
      ADependency.&Type := TdxGanttControlTaskPredecessorLinkType.SS;
  end;
See Also