Back to Devexpress

TdxGanttControlTaskEndLinkEvent Type

vcl-dxganttcontrolviewchart-eb58a412.md

latest2.1 KB
Original Source

TdxGanttControlTaskEndLinkEvent Type

Performs a set of actions after tasks were linked with a dependency created by a mouse drag-and-drop operation.

Declaration

delphi
TdxGanttControlTaskEndLinkEvent = procedure(Sender: TObject; APredecessorLink: TdxGanttControlTaskPredecessorLink) of object;

Parameters

NameTypeDescription
SenderTObject

The Chart View that raised the event.

| | APredecessorLink | TdxGanttControlTaskPredecessorLink |

The newly created dependency.

|

Remarks

You can open the Features Demo and modify its code. Handle the OnTaskEndLink event and use the following code snippet to display the message that one task is the predecessor for another task:

delphi
procedure TFeaturesDemoMainForm.GanttControlViewChartTaskEndLink(Sender: TObject;
  APredecessorLink: TdxGanttControlTaskPredecessorLink);
begin
    ShowMessage('The ''' + GanttControl.DataModel.Tasks.GetItemByUID(APredecessorLink.PredecessorUID).Name + ''' task is now the predecessor of the ''' + APredecessorLink.Task.Name + ''' task');
end;
cpp
void __fastcall TFeaturesDemoMainForm::GanttControlViewChartTaskEndLink(TObject *Sender,
          TdxGanttControlTaskPredecessorLink *APredecessorLink)
{
    ShowMessage("The '" + GanttControl->DataModel->Tasks->GetItemByUID(APredecessorLink->PredecessorUID)->Name + "' task is now the predecessor of the '" + APredecessorLink->Task->Name + "' task");
}

See Also

TdxGanttControlTaskStartLinkEvent

TdxGanttControlTaskLinkEvent

dxGanttControlViewChart Unit