Skip to main content

TreeList.CollapseAll() Method

Collapses all the nodes in the Tree List.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v22.2.dll

NuGet Package: DevExpress.Win.TreeList


public virtual void CollapseAll()


Use the methods below to expand and collapse tree list nodes.

The control’s BeforeExpand, AfterExpand, BeforeCollapse, and AfterCollapse events fire during expand and collapse operations. For example, you can handle the BeforeExpand event to dynamically create child nodes in unbound mode.


The code below collapses all tree list nodes.

See Also