You need to sign in to do that
Don't have an account?
Abhinav Gupta
Sorting Apex SelectOption by Label or Value
Created a simple and easy to use API for sorting SelectOption collection by Label/Value. Not creating a codeshare project for it, as its a single class.
All source code is available here : https://github.com/abhinavguptas/Apex-Select-Option-Sorting
For more details, please check this post : http://www.tgerm.com/2011/08/salesforce-apex-selectoption-sort.html
James Kosharsky 2
I'm sure Abhinav has a good option, but I found that it was easiest to just join the [label]+'@!@'+[value] in a list, sort the list and then seperate out the components to recreate the select option list.