diff --git a/README.md b/README.md index 5e9ffff..c7f435e 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file