You can use Javascript jQuery as shown below. I have not tested it completely, but it should work.
function Sortit() { var $r = $("#MySelect option"); $r.sort(function(a, b) { if (a.text < b.text) return -1; if (a.text == b.text) return 0; return 1; }); $($r).remove(); $("#MySelect").append($($r)); }
Here, your selected tag should have the identifier MySlelect. You can also do this using simple javascript. This will sort by the displayed text of the parameters. Instead, if you want to sort by the value of each parameter, you use the sort below
$r.sort(function(a, b) { return a.value-b.value; });
josephj1989
source share