Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxTreeView.NodeExpandCollapseAction Property

Specifies user actions that expand or collapse a node.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(TreeViewNodeExpandCollapseAction.Auto)]
[Parameter]
public TreeViewNodeExpandCollapseAction NodeExpandCollapseAction { get; set; }

#Property Value

Type Default Description
TreeViewNodeExpandCollapseAction Auto

A TreeViewNodeExpandCollapseAction enumeration value.

Available values:

Name Description
Auto

When node selection is disabled, users can click a node or its Expand/Collapse button to expand/collapse the node.
When node selection is enabled, users can double click a node or click its Expand/Collapse button to expand/collapse the node.

NodeClick

Users can click a node or its Expand/Collapse button to expand/collapse the node.

NodeDoubleClick

Users can double click a node or click the node’s Expand/Collapse button to expand/collapse the node.

ButtonClick

Users can click a node’s Expand/Collapse button to expand/collapse the node.

#Remarks

To expand/collapse a TreeView node, users should click the node or its Expand/Collapse button. If node selection is enabled, users should double-click nodes or click the Expand/Collapse buttons.

TreeView Expand Button

Use the NodeExpandCollapseAction property to change these user actions. For instance, the following example expands/collapses nodes when users click the Expand/Collapse buttons:

Razor
<DxTreeView NodeExpandCollapseAction="TreeViewNodeExpandCollapseAction.ButtonClick" ...> 
    @* ... *@
</DxTreeView> 
See Also