TreeList.ShowingEditor Event
Fires before the TreeList is switched to edit mode.
Namespace: DevExpress.XtraTreeList
Assembly: DevExpress.XtraTreeList.v19.1.dll
Declaration
Event Data
The ShowingEditor event's data class is CancelEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets a value indicating whether the event should be canceled. |
Remarks
Write a ShowingEditor event handler to perform specific actions each time a cell editor is about to be displayed. It can be used to prohibit switching the TreeList control to edit mode. Set the Cancel parameter to true for this purpose.
Cells in the Tree List control are identified by a corresponding column and node. For the cell currently being processed, the column and node are identified by the TreeList.FocusedColumn and TreeList.FocusedNode properties respectively.
You can prohibit cell editing by disabling the TreeListOptionsBehavior.Editable option. Cells of a particular column can also be made read-only. Enable the desired column’s TreeListColumn.ReadOnly option for this purpose. This option is available via the column’s TreeListColumn.OptionsColumn property. Write a ShowingEditor event handler to prohibit cell editing within specific rows or make individual cells read-only.
Note
The ShowingEditor event does not fire for cells within the Auto Filter Row .
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ShowingEditor event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.