Back to Devexpress

TreeListView.CanSelectCell Event

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-d63de0f0.md

latest2.9 KB
Original Source

TreeListView.CanSelectCell Event

Occurs in multiple cell selection mode when a user tries to select a cell and allows you to prevent the cell selection.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public event CanSelectCellEventHandler CanSelectCell
vb
Public Event CanSelectCell As CanSelectCellEventHandler

Event Data

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

PropertyDescription
CanSelectCellGets or sets whether an end-user can select the processed cell.
ColumnGets a column to which the processed cell belongs.
RowGets a data row object that corresponds to the processed cell.
RowHandleGets the handle of a row to which the processed cell belongs.
ViewGets a GridControl view to which the processed cell belongs.

Remarks

Handle the CanSelectCell event to dynamically specify cells that users cannot select.

Set the CanSelectCellEventArgs.CanSelectCell property to false to prevent the cell selection. Use the CanSelectCellEventArgs.Row, CanSelectCellEventArgs.RowHandle, and CanSelectCellEventArgs.Column event argument properties to obtain the processed cell.

Handle the TreeListView.CanUnselectCell event to specify cells that users cannot unselect.

Refer to the following help topic for more information: Cell Selection.

See Also

CanSelectRow

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace