Shaitan00 Posted January 9, 2004 Posted January 9, 2004 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? Quote
*Gurus* divil Posted January 10, 2004 *Gurus* Posted January 10, 2004 The TreeView has a Sorted property. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Shaitan00 Posted January 13, 2004 Author Posted January 13, 2004 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]? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.