Back to Devexpress

TreeList.ActiveEditor Property

windowsforms-devexpress-dot-xtratreelist-dot-treelist-105c588f.md

latest3.8 KB
Original Source

TreeList.ActiveEditor Property

Gets the currently active cell editor.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[Browsable(false)]
public BaseEdit ActiveEditor { get; }
vb
<Browsable(False)>
Public ReadOnly Property ActiveEditor As BaseEdit

Property Value

TypeDescription
BaseEdit

A BaseEdit descendant representing the currently active editor. null ( Nothing in Visual Basic) if no cell is being edited at the moment.

|

Remarks

Cell values are edited by means of editors inherited from the BaseEdit class. Editors available for editing cell values are stored within the repository, which can be accessed via the Tree List’s EditorContainer.RepositoryItems property. The repository allows you to add, delete and customize individual editors within it.

You can assign editors to columns via the TreeListColumn.ColumnEdit property. In such a case, each cell in the column will use the specified editor. On the other hand, you can specify an editor for each individual cell by handling the TreeList.CustomNodeCellEdit event.

The editor is automatically created when a cell it is assigned to is being edited. This prevents the creation of multiple instances of the editor. As the result, the ActiveEditor property returns null ( Nothing in Visual Basic) if no cell is being edited at the moment. Otherwise it returns the editor assigned to the cell whose value is being edited.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ActiveEditor property.

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.

xaf-win-enable-inplace-editing-in-tree-list-view/CS/EFCore/TreeListInplaceEF/TreeListInplaceEF.Win/Controllers/TreeListInplaceEditViewController.cs#L69

csharp
ObjectTreeList treeList = (ObjectTreeList)sender;
IGridInplaceEdit activeEditor = treeList.ActiveEditor as IGridInplaceEdit;
if (activeEditor != null && treeList.FocusedObject is BaseObject) {

See Also

ColumnEdit

CustomNodeCellEdit

State

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace