Skip to content
Merged
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
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# 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 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 [WinForms TreeViewAdv](https://www.syncfusion.com/winforms-ui-controls/treeview) 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
``` 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)

Take a moment to peruse the [WinForms TreeView - Getting Started](https://help.syncfusion.com/windowsforms/treeview/getting-started) documentation, where you can find about treeview with code examples.