My Treeview is working fine with the following layout
Expand|Select|Wrap|Line Numbers
- 1 Parent
- 2 Parent
- 1 Child
- 2 Child
- 3 Parent
- ..............etc
If tx.Text.Length <> tx.Text.Length Then
Return tx.Text.Length - ty.Text.Length
End If
Return String.Compare(ty.Text, tx.Text)
Which sorts by length - it works but not a whole lot of use.
Could someone point me please to the answers to my 2 problems.
1 How do I sort by node number 1 2 3 - 10 11 12 ...which is how the treeview starts off - at the moment with tv.sort I can only get it to sort back to 1 10 11 - 2 20 21 - etc...
2 Also I need to sort by parents with childs first then parents without like
Expand|Select|Wrap|Line Numbers
- 1 Parent
- 1 Child
- 2 Cild
- 3 Parent
- 1 Child
- 2 Child
- 2 Parent
- 4 Parent
- 5 Parent
Or a link to a sample would be great as I can't find anything.
Many thanks in advance.