TreeListView.CanSelectCell Event

Occurs when an end-user tries to select a treelist cell and allows you to prevent selecting a particular cell.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.1.dll

Declaration

public event CanSelectCellEventHandler CanSelectCell
Public Event CanSelectCell As CanSelectCellEventHandler

Event Data

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

Property Description
CanSelectCell Gets or sets whether an end-user can select the processed cell.
Column Gets a column to which the processed cell belongs.
Row Gets a data row object that corresponds to the processed cell.
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 CanSelectCell event to dynamically prevent end-users from selecting particular cells.

Set the event argument's CanSelectCellEventArgs.CanSelectCell property to false to prevent an end-user from selecting a processed cell. Use the CanSelectCellEventArgs.Row, CanSelectCellEventArgs.RowHandle, and CanSelectCellEventArgs.Column event argument properties to retrieve a processed cell.

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

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

See Also