Log In
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Collapse]Site Navigation and Layout
   [Expand]Product Information
   [Expand]Form Layout
   [Expand]Navigation Bar
   [Expand]Page Control and Tab Control
    Panel Overview
   [Expand]Site Map Control
   [Expand]Tag Cloud Control
   [Expand]Title Index
     ASPxTreeView Overview
     [Expand]Binding to Data
      Expanding and Collapsing Nodes
      Animation Effect
      Check Box Support
    [Expand]Visual Elements
    [Expand]Member Tables
    [Expand]ASPxTreeView - Animated Images
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Expanding and Collapsing Nodes

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 Members Server Members
To expand/collapse a particular node ASPxClientTreeViewNode.SetExpanded TreeViewNode.Expanded
To determine the node's expansion state ASPxClientTreeViewNode.GetExpanded TreeViewNode.Expanded
To expand ASPxTreeView down to the specified node ASPxTreeView.ExpandToNode

To impact all nodes: Client Members Server Members
To expand all nodes ASPxClientTreeView.ExpandAll ASPxTreeView.ExpandAll
To collapse all nodes ASPxClientTreeView.CollapseAll ASPxTreeView.CollapseAll
To expand all nodes to the defined depth ASPxTreeView.ExpandToDepth

To respond to expanding/collapsing nodes: Client Events Server Events
Before action ASPxClientTreeView.ExpandedChanging ASPxTreeView.ExpandedChanging
After action ASPxClientTreeView.ExpandedChanged ASPxTreeView.ExpandedChanged

Expanded Member Table

Expanded Examples

Is this topic helpful?​​​​​​​