Click to See Complete Forum and Search --> : Sorting a Menu object that contain MenuItem object


burnt1ce85
01-25-2007, 02:11 PM
I created a Menu object in a .aspx file and i'm dynamically inserting MenuItem objects into the Menu object.

At the end of inserting MenuItem objects, i would like to sort the MenuItem's by their Text value. How can i do this? Menu does not have a public sort method that i can use.

Thanks

Chitra Xavier
01-26-2007, 12:16 AM
Hi....

Get the text values into ArrayList , sort in and then add the values one by one to MenuItem.Hope this might solve ur problem

burnt1ce85
01-26-2007, 01:21 PM
Is there not a sort() method that i can use that would automatically sort the menu for me?

-Thanks