TreeListView.CanUnselectCell Event
Occurs in multiple cell selection mode when a user tries to unselect a cell and allows you to prevent this operation for a particular cell.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: 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 specify cells that users cannot unselect.
Set the CanUnselectCellEventArgs.CanUnselectCell property to false
to keep the processed cell selected. Use the CanUnselectCellEventArgs.Row, CanUnselectCellEventArgs.RowHandle, and CanUnselectCellEventArgs.Column event argument properties to obtain the processed cell.
Handle the TreeListView.CanSelectCell event to specify cells that users cannot select.
Refer to the following help topic for more information: Cell Selection.