TreeView Sort

  • Thread starter Thread starter Jonathan Dixon
  • Start date Start date
J

Jonathan Dixon

Can anyonoe tell me is it possible to sort a treeview by the child nodes(
*See Below ) if so can someone tell me where to look

e.g

TreeVIew
|
|_ Parent Node
| |_Childe Node // Sort by this node
|_ Parent Node
|_Child Node // Sort by this node


Regards

Jonathan Dixon
 
Short answer, yes it is possible, by writing your own code. It is not
natively supported by the ListView. Just write an algorithm to insert the
node in the correct location based off of your criteria.

The "TreeNodeCollection" has an "Insert" method that allows for an index.
You'll have to calculate this index.

- Noah Coad -
Microsoft MVP
 
Back
Top