+ Start a Discussion

Need Drop down Instead of Scroll

Hi friends Thanks in Advance
Need Dropdown Button insted of Y-axis Scroll

Mass Task
/*Visualforce Code*/
<apex:outputLabel value="Related To:" />
	<apex:outputPanel >
		<div id='spanDisplayLabel' style='width:250px; height:30px; overflow-y:scroll;'>
		<apex:dataTable value="{!tableDisplayNames}" var="tableDisplayName" >
		<apex:column value="{!tableDisplayName}"/>
/*Controller code*/
public List <String> getTableDisplayNames(){
        List <String> rtnList = new List<String>();
        for(String displayName:displayNames.values())
            rtnList.add('-' + displayName);
        return rtnList;

Richard Jimenez 9Richard Jimenez 9
Hi Rohitha,

To display a drop-down list, display the values using <apex:selectList> component.

See: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_selectList.htm

Hope that helps,
Richard Jimenez