Category / Section
How to programmatically collapse and expand the TreeNodeAdv in WinForms MulticolumnTreeview?
1 min read
Collapse and expand the TreeNodeAdv
In MultiColumnTreeView, the TreeNodeAdv can be collapsed and expanded programmatically by using the CollapseAll and ExpandAll functions. Refer to the following code examples.
C#
//Collapses the nodes in MultiColumnTreeView this.multiColumnTreeView1.CollapseAll(); //Expands the nodes in MultiColumnTreeview this.multiColumnTreeView1.ExpandAll();
VB
'Collapses the nodes in MultiColumnTreeView Me.multiColumnTreeView1.CollapseAll() 'Expands the nodes in MultiColumnTreeview Me.multiColumnTreeView1.ExpandAll()
Samples: