maui-devexpress-dot-maui-dot-datagrid-dot-datagridview-bc933715.md
Occurs when users drop a row.
Namespace : DevExpress.Maui.DataGrid
Assembly : DevExpress.Maui.DataGrid.dll
NuGet Package : DevExpress.Maui.DataGrid
public event EventHandler<DropRowEventArgs> DropRow
The DropRow event's data class is DropRowEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Cancel | Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs. |
| DragItem | Gets a data source item that corresponds to the dragged row. Inherited from DragRowEventArgs. |
| DropItem | Gets a data source item that corresponds to the drop target row. |
| DropRowHandle | Gets the grid’s dropped row handle. |
| RowHandle | Returns the handle of the processed row. Inherited from CancelRowEventArgs. |
You can cancel the row drop to specific positions. In this case, a place for the row drop is allocated, but the row returns to its initial position when it is released.
Subscribe to DropRow event.
In the event handler, set the e.Cancel property to true to restrict row drop to the specified positions. Use the RowHandle property to obtain the dragged row handle and the DropRowHandle property to get the drop position. To access a data source item (EmployeeTask with the Name property) that corresponds to the drop target row, use the DropItem property.
See Also