You need to sign in to do that
Don't have an account?

picklist problem
public List<string> getGeneralExpense(){
List<string> options = new List<string>();
Schema.DescribeFieldResult field = Schema.sObjectType.expense__c.fields.General_Expenses__c;
List<Schema.PicklistEntry> picklist = field.getPicklistValues();
for(Schema.PicklistEntry p : picklist) {
options.add(p.getLabel());
}
return options;
}
can u give an explanation about code
here you are getting the picklist values of the respective object dynamically....
So Kiran, can u tell me that how can store entire picklist values which comes as dynamically in outputText or as CommandLink....
Please tell me this things bcoz I am getting values which comes as dynamically but not able to show on VFPage...
I tried this things..
<apex:pageBlockTable value="{!DynamicThings__c}" var="obj">
<apex:column>
<apex:outputText value="{!obj.picklist2__c}">
</apex::column>
</apex:pageBlockTable>
to show the picklist values in the vf page you have to use the select list component and selectoption to fill the values.....