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

TdxGanttControlTaskEndDragEvent Type

Performs a set of actions in response to the task movement in the Chart View‘s task sheet.

#Declaration

Delphi
TdxGanttControlTaskEndDragEvent = procedure(Sender: TObject; ATask: TdxGanttControlTask) of object;

#Parameters

Name Type Description
Sender TObject

The Chart View that raised the event.

ATask TdxGanttControlTask

A rearranged task.

#Remarks

You can open the Features Demo and modify its code. The code snippet below shows how you can handle the OnTaskEndDrag event to add the Flag1 custom field that specifies that a task was rearranged:

procedure TFeaturesDemoMainForm.GanttControlViewChartOptionsSheetTaskEndDrag(
  Sender: TObject; ATask: TdxGanttControlTask);
var
  AValue: TdxGanttControlExtendedAttributeValue;
begin
  inherited;
  AValue := ATask.ExtendedAttributes['Flag1'];
  if AValue = nil then
  begin
    AValue := ATask.ExtendedAttributes.Append;
    AValue.FieldID := GanttControl.DataModel.ExtendedAttributes.Find('Flag1', TdxGanttControlExtendedAttributeLevel.Task).FieldID;
  end;
  AValue.Value := True;
end;
See Also