DataGridView.CompleteRowDragDrop Event
Occurs after the drag-and-drop operation is completed.
Namespace: DevExpress.Maui.DataGrid
Assembly: DevExpress.Maui.DataGrid.dll
NuGet Package: DevExpress.Maui.DataGrid
Declaration
public event EventHandler<CompleteRowDragDropEventArgs> CompleteRowDragDrop
Event Data
The CompleteRowDragDrop event's data class is CompleteRowDragDropEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Item | Gets a data source item that corresponds to the dragged and dropped row. |
RowHandle | Gets the grid’s row handle. Inherited from RowEventArgs. |
Remarks
You can define an action that is executed when the drag-and-drop operation is completed.
Subscribe to the
CompleteRowDragDrop
event.<dxg:DataGridView AllowDragDropRows="True" CompleteRowDragDrop="grid_CompleteRowDragDrop"/>
In the event handler, use the RowHandle property to get the dropped row handle. To access a data source item (EmployeeTask with the DueDate property) that corresponds to the dropped row, use the Item property.
The following example shows how to raise an alert message when a user drags and drops an item:
using DevExpress.Maui.DataGrid; // ... private void grid_CompleteRowDragDrop(object sender, CompleteRowDragDropEventArgs e) { DisplayAlert("Reminder", "The row with due date of " + ((EmployeeTask)e.Item).DueDate + " has changed its position to " + (e.RowHandle + 1) + ". Don't miss the deadline!", "OK"); }