We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

[Solved] - Sort parent node question!

Thread ID:

Created:

Updated:

Platform:

Replies:

154542 May 24,2020 09:45 PM UTC May 26,2020 10:51 AM UTC WinForms 3
loading
Tags: TreeViewAdv
The GridLock
Asked On May 24, 2020 09:45 PM UTC

Hi,
Can I sort parent nodes (regardless of child node level2), which is sort nodes of root nodes (keep child nodes intact). 
Do I have to reassign all nodes?
Thanks you.

Duraimurugan Vedagiri [Syncfusion]
Replied On May 25, 2020 10:23 AM UTC

Hi GridLock,

Query: How to sort root node alone(keep child nodes intact)?

You can achieve this requirement with help TreeViewAdv.Root property.

Code Snippet
//Sort the node based on order
TreeViewAdv.Root.SortOrder = SortOrder.Ascending; 
//Sort the node based on type
TreeViewAdv.Root.SortType = TreeNodeAdvSortType.Text; 
//Sort the node
TreeViewAdv.Root.Sort(); 

Please refer the below documentation and sample for your reference.

Documentation : https://help.syncfusion.com/windowsforms/treeview/sorting

Sample : https://www.syncfusion.com/downloads/support/forum/154542/ze/Sample-1931506687.zip  

Regards,
Durai

The GridLock
Replied On May 25, 2020 08:34 PM UTC

Thanks Durai ,It worked .


Duraimurugan Vedagiri [Syncfusion]
Replied On May 26, 2020 10:51 AM UTC

Hi GridLock,

Thanks for your update.

Please let us know if you need any further assistance.

Regards,
Durai

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon