Back to Devexpress

DataGridView.DragRow Event

maui-devexpress-dot-maui-dot-datagrid-dot-datagridview-ec5465da.md

latest2.1 KB
Original Source

DataGridView.DragRow Event

Occurs when users touch and hold a data row to drag it.

Namespace : DevExpress.Maui.DataGrid

Assembly : DevExpress.Maui.DataGrid.dll

NuGet Package : DevExpress.Maui.DataGrid

Declaration

csharp
public event EventHandler<DragRowEventArgs> DragRow

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
DragItemGets a data source item that corresponds to the dragged row.
RowHandleReturns the handle of the processed row. Inherited from CancelRowEventArgs.

Remarks

The DragRow event allows you to manage the drag action.

You can use this event to prevent drag of the specified row:

  1. Subscribe to the DragRow event.

  2. In the event handler, specify a row(s) that cannot be dragged. Use the RowHandle or DragItem property to identify the row by its handle or data source item. Set the e.Cancel property to true to prevent drag-and-drop operations.

See Also

DataGridView Class

DataGridView Members

DevExpress.Maui.DataGrid Namespace