DxTreeViewBase.AllowSelectNodes Property

Specifies whether or not nodes can be selected.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.dll


public bool AllowSelectNodes { get; set; }

Property Value

Type Description

true, to allow selecting nodes, otherwise, false


When the AllowSelectNodes property is set to true, the DxTreeView component allows users to select a node with a mouse click. When a node is selected by end-user interaction, the SelectionChanged event fires.

You can use the SelectNode(Func<ITreeViewNodeInfo, Boolean>) method to select a node programmatically.

The code sample below demonstrates how to get a text of the selected node.

<DxTreeView AllowSelectNodes="true" 

@code  {
    string SelectedGroup = "none";

    void SelectionChanged(TreeViewNodeEventArgs e)
        SelectedGroup = e.NodeInfo.Text;

The image below shows the result.

TreeView Node Selection

Online Demo

TreeView - Selection

See Also