Skip to main content
A newer version of this page is available. .

TreeList.CollapseAll() Method

Collapses all the nodes in the Tree List.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v19.2.dll

Declaration

public void CollapseAll()

Remarks

This method when called collapses all the nodes which are currently expanded in the Tree List. If only a particular node(s) needs to be collapsed via code set its TreeListNode.Expanded property to false. To expand all nodes in the Tree List use the TreeList.ExpandAll method.

Example:

treeList1.CollapseAll();

The following code snippets (auto-collected from DevExpress Examples) contain references to the CollapseAll() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also