TreeView expandall

Is there a way to expand all the nodes in the treeview without going through and expanding them one at a time? Similar to the expandall function in the asp treeview?


3 Replies

NR Nandakumar R Syncfusion Team December 11, 2007 12:23 AM UTC

Hi Kathy,

Can you try this function and let me know if this helps?

[C#]
this.treeViewAdv1.ExpandAll();

Regards,
Nanda



KG Kathy Gray December 20, 2007 06:08 PM UTC

I get this error:

'expandall' is not a member of 'Syncfusion.Web.UI.WebControls.Tools.TreeView'.


>Hi Kathy,

Can you try this function and let me know if this helps?

[C#]
this.treeViewAdv1.ExpandAll();

Regards,
Nanda





AD Administrator Syncfusion Team December 26, 2007 08:54 PM UTC

Hi Kathy ,

You can expand all the parent nodes by using the Expanded property of the TreeViewNode. Please refer to the following code snippet.

[C#]

foreach (TreeViewNode m_node in this.TreeView1.Items)
{
m_node.Expanded = true;
}

Please let me know if this helps.

Regards,
Nagaraj




Loader.
Up arrow icon