Author: madcour80 | Posted on: 9/28/2009 8:07:16 AM | Views : 365

I have a TreeView control populated by an object data source, and I need to sort it's nodes. When the TreeView is built, it looks like this:
-Veggies 
  -Lettuce
  -Carrot
  -Potatoe
-Fruits
  -Bananna
  -Apple
  -Plum
  -Graps
I need to sort the TreeView alphabetically to look like this:
-Fruits
  -Apple
  -Bananna
  -Grape
  -Plum
-Veggies
  -Carrot
  -Lettuce
  -Potatoe

System.Windows.Forms has a Sort(), but mine is a System.Web.UI.TreeView which has no Sort() method.  How you sort this type of TreeView including it's nested child nodes?
 
Thanks!
...

Go to the complete details ...