DataViewBase.CanSelectRow Event
Occurs in multiple row select mode when an end-user tries to select a grid row (node) and allows you to prevent selecting a particular row (node).
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v20.1.Core.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core
Declaration
Event Data
The CanSelectRow event's data class is CanSelectRowEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
CanSelectRow | Gets or sets whether an end-user can select the processed row. |
Row | Gets a data row object that corresponds to the processed row (or treelist node). |
RowHandle | Gets the handle of a processed row. |
View | Gets a GridControl view to which the processed row belongs. |
Remarks
Handle the CanSelectRow event to dynamically prevent end-users from selecting particular rows.
Set the event argument’s CanSelectRowEventArgs.CanSelectRow property to false to prevent an end-user from selecting a processed row. Use the CanSelectRowEventArgs.Row, and CanSelectRowEventArgs.RowHandle event argument properties to retrieve a processed row.
Handle the DataViewBase.CanUnselectRow event to prevent end-users from unselecting a particular row.
Cell Selection
Handle the TableView.CanSelectCell (TreeListView.CanSelectCell for the TreeListView) event to prevent end-users from selecting a particular cell.