System.Web.UI.WebControls.TreeNode.CollapseAll Method

Collapses the current node and all its child nodes.

Syntax

public void CollapseAll ()

Remarks

Use the TreeNode.CollapseAll method to conveniently collapse the current node and all its child nodes.

Note:

As an alternative, you can also set the TreeNode.Expanded property of the current node and each of its child nodes to false.

To collapse only the current node, consider using the TreeNode.Collapse method.

TreeView.CollapseAll will collapse all the nodes in the entire tree.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0