mobilecontrols-devexpress-dot-xamarinforms-dot-datagrid-dot-datagridview-c480bb9c.md
Occurs when users drop a row.
Namespace : DevExpress.XamarinForms.DataGrid
Assembly : DevExpress.XamarinForms.Grid.dll
NuGet Package : DevExpress.XamarinForms.Grid
public event EventHandler<DropRowEventArgs> DropRow
The DropRow event's data class is DropRowEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Allow | Gets or sets whether to allow or prohibit an operation with the row. Inherited from RowAllowEventArgs. |
| 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 | Gets the grid’s row handle. Inherited from RowEventArgs. |
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 Allow property to false 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