Back to Devexpress

DataGridView.DropRow Event

mobilecontrols-devexpress-dot-xamarinforms-dot-datagrid-dot-datagridview-c480bb9c.md

latest2.9 KB
Original Source

DataGridView.DropRow Event

Occurs when users drop a row.

Namespace : DevExpress.XamarinForms.DataGrid

Assembly : DevExpress.XamarinForms.Grid.dll

NuGet Package : DevExpress.XamarinForms.Grid

Declaration

csharp
public event EventHandler<DropRowEventArgs> DropRow

Event Data

The DropRow event's data class is DropRowEventArgs. The following properties provide information specific to this event:

PropertyDescription
AllowGets or sets whether to allow or prohibit an operation with the row. Inherited from RowAllowEventArgs.
DragItemGets a data source item that corresponds to the dragged row. Inherited from DragRowEventArgs.
DropItemGets a data source item that corresponds to the drop target row.
DropRowHandleGets the grid’s dropped row handle.
RowHandleGets the grid’s row handle. Inherited from RowEventArgs.

Remarks

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.

  1. Subscribe to DropRow event.

  2. 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

DataGridView Class

DataGridView Members

DevExpress.XamarinForms.DataGrid Namespace