Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# How-to-programmatically-expand-the-root-nodes-in-winforms-treeviewadv-
This session explains how to programmatically expand the root nodes in winforms treeviewadv?
# How to programmatically expand the root nodes in WinForms TreeView?

This session explains how to programmatically expand the root nodes in [WinForms TreeView](https://help.syncfusion.com/windowsforms/treeview/overview) (TreeViewAdv).

You can expand the [Root](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.TreeViewAdv.html#Syncfusion_Windows_Forms_Tools_TreeViewAdv_Root) nodes of the [TreeViewAdv](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.TreeViewAdv.html) by using the [Expand](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Tools.TreeNodeAdv.html#Syncfusion_Windows_Forms_Tools_TreeNodeAdv_Expand) method of the node.

``` csharp
TreeNodeAdv root = this.treeViewAdv1.Root;

foreach (TreeNodeAdv node in root.Nodes)
{
// Call the Expand method on each root node.
node.Expand();
}

root.Expand();
```

![How to programmatically expand the root nodes in WinForms TreeView](https://www.syncfusion.com/uploads/user/kb/wf/wf-28805/wf-28805_img1.png)