Sorting subnodes in TreeViewAdv

I have a multi-column TreeViewAdv, and I want to support alphabetically sorting by the name of the item.

My code populates the TreeViewAdv control using an itemtemplate.







I set Sorting on the TreeViewAdv to Ascending, but what else do I need to do?

Thanks!





1 Reply

KL Karthikeyan L Syncfusion Team April 24, 2012 12:49 AM UTC

Hi CJ,

By setting the ‘SortingField’ property and have call ‘SortTreeViewItem’ method we can sort the TreeView based on fields. We have attached the sample for your reference.

[Sample link]: http://www.syncfusion.com/downloads/Support/DirectTrac/92536/CS1955209427.zip

Please let us know if you have any queries.

Regards,
Karthikeyan.



Loader.
Up arrow icon