function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Devendra Babu VelakaturiDevendra Babu Velakaturi 

how to set pick list values in ascending order in visual force page.?

I want these picklist values in ascending order.How to set picklist records in acending order ?Could you please help me on this ?
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi devendra,
After fetching and adding picklist values to list ,sort that list.Using sort method you can align options alphabetically.
Just like below
picklistOptions.sort();
Please refer below link which might help you in this
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_collections_lists_sorting.htm

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards​​​​​​​
Dushyant SonwarDushyant Sonwar

Devendra Babu Velakaturi,

If @Devi Chandrika answer doesn't help you, then please post your apex class and vf page code . This will be easier for other people to lookout for problem and provide you better solution and understand what is causing the issue.

Regards,