You need to sign in to do that
Don't have an account?
URVASHI
passing default value in select list through constructor after sorting the select list
hello,
Can anyone help
I m new to Salesforce please help.
I have a picklist with some values of fruits in it.
Example:
Apple Grapes Banana etc.
I have sorted these values alphabetically.
But now i want a default value to be added in picklist like example: '--Select value--'
Can i pass this value directly to the constructor to make it default to picklist?
Or should I add it first to the select list.
Please help
Thanks.
Hey just try this...
list<SelectOption> updatedList=new List<SelectOption>();
updatedList.add('---<Select None>---');
updatedList.addAll(**Put the Sorted list here****);
use the updated List in your Vf page...
All Answers
Hey just try this...
list<SelectOption> updatedList=new List<SelectOption>();
updatedList.add('---<Select None>---');
updatedList.addAll(**Put the Sorted list here****);
use the updated List in your Vf page...