Back to Devexpress

Expanding and Collapsing Nodes

aspnet-8596-components-site-navigation-and-layout-tree-view-concepts-expanding-and-collapsing-nodes.md

latest2.9 KB
Original Source

Expanding and Collapsing Nodes

  • Jul 29, 2021

ASPxTreeView allows end-users to hide/show a nodes’ children. End-users can expand or collapse nodes by double-clicking them. It is also possible to expand/collapse nodes by clicking expand buttons. The visibility of these buttons can be controlled by using the ASPxTreeView.ShowExpandButtons property.

ASPxTreeView provides the server and client API, which expand and collapse nodes in code. You can perform the following actions with a node.

To impact a particular node:Client MembersServer Members
To expand/collapse a particular nodeASPxClientTreeViewNode.SetExpandedTreeViewNode.Expanded
To determine the node’s expansion stateASPxClientTreeViewNode.GetExpandedTreeViewNode.Expanded
To expand ASPxTreeView down to the specified nodeASPxTreeView.ExpandToNode
To impact all nodes:Client MembersServer Members
To expand all nodesASPxClientTreeView.ExpandAllASPxTreeView.ExpandAll
To collapse all nodesASPxClientTreeView.CollapseAllASPxTreeView.CollapseAll
To expand all nodes to the defined depthASPxTreeView.ExpandToDepth
To respond to expanding/collapsing nodes:Client EventsServer Events
Before actionASPxClientTreeView.ExpandedChangingASPxTreeView.ExpandedChanging
After actionASPxClientTreeView.ExpandedChangedASPxTreeView.ExpandedChanged

Member Table

Member Table: Expanding and Collapsing Nodes

Examples