Skip to main content

DataViewBase.CanUnselectRow Event

Occurs in multiple row select mode when an end-user tries to unselect a grid row (node) and allows you to prevent unselecting a particular row (node).

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v22.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core


public event CanUnselectRowEventHandler CanUnselectRow

Event Data

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

Property Description
CanUnselectRow Gets or sets whether an end-user can unselect the processed row.
Row Gets a data row object that corresponds to the processed cell.
RowHandle Gets the handle of a processed row.
View Gets a GridControl view to which the processed row belongs.


Handle the CanUnselectRow event to dynamically prevent end-users from unselecting particular rows.

Set the event argument’s CanUnselectRowEventArgs.CanUnselectRow property to false to prevent an end-user from unselecting a processed row. Use the CanUnselectRowEventArgs.Row, and CanUnselectRowEventArgs.RowHandle event argument properties to retrieve a processed row.

Handle the DataViewBase.CanSelectRow event to prevent end-users from selecting a particular row.

Cell Unselection

Handle the TableView.CanUnselectCell (TreeListView.CanUnselectCell for the TreeListView) event to prevent end-users from unselecting a particular cell.

See Also