diff --git a/README.md b/README.md index 048faa9..f822bc9 100644 --- a/README.md +++ b/README.md @@ -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) \ No newline at end of file