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