All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

TreeViewControl.AllowEditing Property

Gets or sets whether users can edit node values. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

Declaration

public bool AllowEditing { get; set; }
Public Property AllowEditing As Boolean

Property Value

Type Default Description
Boolean

false

true to allow users to edit node values; otherwise, false.

Remarks

The TreeViewControl uses an in-place editor that depends on its content.

Use the EditSettings property to manually define an editor.

Handle the ValidateNode event to validate new node values.

Use the ShowingEditor event to prevent the activation of a node's editor.

In unbound mode, users cannot edit nodes of simple types (string, integer, etc.). To allow users to edit an unbound tree, set an object as the node's content.

public class ProjectObject {
    public string Name { get; set; }
}
<dxg:TreeViewControl AutoExpandAllNodes="True" TreeViewFieldName="Name" AllowEditing="True">
    <dxg:TreeViewControl.Nodes>
        <dxg:TreeListNode>
            <dxg:TreeListNode.Content>
                <local:ProjectObject Name="Root Node"/>
            </dxg:TreeListNode.Content>
            <dxg:TreeListNode.Nodes>
                <dxg:TreeListNode>
                    <dxg:TreeListNode.Content>
                        <local:ProjectObject Name="Level 1"/>
                    </dxg:TreeListNode.Content>
                    <dxg:TreeListNode.Nodes>
                        <dxg:TreeListNode>
                            <dxg:TreeListNode.Content>
                                <local:ProjectObject Name="Level 2"/>
                            </dxg:TreeListNode.Content>
                        </dxg:TreeListNode>
                    </dxg:TreeListNode.Nodes>
                </dxg:TreeListNode>
            </dxg:TreeListNode.Nodes>
        </dxg:TreeListNode>
    </dxg:TreeViewControl.Nodes>
</dxg:TreeViewControl>
See Also