I have a treeview that need to be sorted according to the tag of every node and also according to the alpha beta.
for example:
I want to sort it, that nodes with tag A will be firsts, and just then nodes with tag B. but, i want the nodes that contains tag A, to be sorted from A to Z.
(the order = Node1,Node3,Node2)
please help me , How can i do it?
thanks in advance!
Assuming you're talking about System.Windows.Forms.Treeview, you can use TreeViewNodeSorter and an implementation of IComparer to create a custom sorting strategy.
http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.treeviewnodesorter.aspx