Sorting all nodes in treeViewAdv

Hi, In Syncfusion treeViewAdv''s Sorting sample ,I was able to sort only the root nodes.Is there any way to sort all the nodes in the treeViewAdv i.e, the child nodes too.It works well in .Net treeView.Could you please provide me a workaround for this.Help will be appreciated. Jubin

2 Replies

DT Deepa TS Syncfusion Team February 13, 2006 03:49 AM UTC

Hi Jubin, You could sort all the nodes in a treeViewAdv by using the following code snippet. private void button2_Click(object sender, System.EventArgs e) { if(this.treeViewAdv1.Parent.HasChildren) { this.treeViewAdv1.Nodes.Sort(); } foreach(TreeNodeAdv tna in this.treeViewAdv1.Root.Nodes) { if(tna.HasChildren) { tna.Nodes.Sort(); } } } Please take a look at the attached sample and let me know if this helps you. Regards, Deepa.T.S.

Sorting0.zip


AD Administrator Syncfusion Team February 17, 2006 11:12 AM UTC

Wow it worked now. Thanks...

Loader.
Up arrow icon