Tab

ASPxTreeView.CollapseAll() Method

Collapses all nodes in the ASPxTreeView.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public void CollapseAll()

Remarks

The CollapseAll method collapses all nodes which are currently expanded. This method invokes the ASPxTreeView.ExpandedChanging event before collapsing and the ASPxTreeView.ExpandedChanged event after collapsing.

To collapse all nodes on the client, use the ASPxClientTreeView.CollapseAll method.

For more information, see the Expanding and Collapsing Nodes topic.

Examples

The code below demonstrates how you can use the CollapseAll method.

ASPxTreeView1.CollapseAll();
See Also