Back to Devexpress

ASPxTreeView.CollapseAll() Method

aspnet-devexpress-dot-web-dot-aspxtreeview-f3b57885.md

latest1.9 KB
Original Source

ASPxTreeView.CollapseAll() Method

Collapses all nodes in the ASPxTreeView.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public void CollapseAll()
vb
Public Sub 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.

Example

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

csharp
ASPxTreeView1.CollapseAll();

See Also

Expanding and Collapsing Nodes

Member Table: Expanding and Collapsing Nodes

Tree View

ASPxTreeView Class

ASPxTreeView Members

DevExpress.Web Namespace