Hi Yang,
Greetings from Syncfusion.
After analyzing your query, we have comprehended that you
desire to obtain the dropped record after sorting it by dropIndex in the
RowDropping event. Regrettably, this cannot be achieved in the RowDropping
event. However, you can fulfill this requirement by utilizing the RowDropped
event. To assist you in understanding this concept better, we have created a
sample with the RowDropped event. In this event, we retrieve the record from
the current view record using args.DropIndex. For more detailed information,
kindly refer to the code snippet and sample provided below.
Code Snippet:
|
public async void
RoWDroppedHandler(RowDroppedEventArgs<TaskData> args)
{
List<TaskData>
record = Gantt.GetCurrentViewRecords();
int index =
args.Target.ID == "Child" ? args.DropIndex : args.DropIndex -
1;
TaskData
droppedRecord = record[index];
droppedRecord.TaskName = "New Task";
await
Gantt.RefreshAsync();
}
|
Sample: Sample
Regards,
Vignesh Sivalingam