Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Given a Tree View [tv] populated by many nodes.

 

Is there an easy way to put the Tree View in order, alphabetical for example, or does this require a large amount of code to �sort� threw the tree manually replacing the nodes?

Posted

Using �tv.Sorted = true;� did most of the job [thank you, sorry for not looking it up before].

 

However it also raises a new issue, assume my TreeView resembles the usual TreeView from Windows Registry, thus it contains Values and Keys [values are nodes that contain more keys, like Folders in windows explorer].

 

Currently the Sorted method is sorting everything equally, I need the sorter to sort all the values [folders] then below sort all the keys [actual nodes with values]. This would also mimic the usual Windows Explorer [folders sorted on top, files sorted below] instead of mixing them all up.

 

Is this possible [without massive code implementation]?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...