You need to sign in to do that
Don't have an account?
![RajeevlsHyd RajeevlsHyd](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Set default value for a picklist field in VF page
I want to set a defalut value of a picklist field in VF page.. Please suggest how to acheive?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
I want to set a defalut value of a picklist field in VF page.. Please suggest how to acheive?
Hi Rajeev,
To set default value to picklist you have to set variable value in your constructor.
see Below Example.
VF Page:
Apex Class:
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/
All Answers
Hi Rajeev,
To set default value to picklist you have to set variable value in your constructor.
see Below Example.
VF Page:
Apex Class:
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/
public List<SelectOption> lstCountries {get; set;}
Thanks, Nagesh M