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
RohithaSfdcRohithaSfdc 

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}"/>
		</apex:dataTable>                    
		</div>
</apex:outputPanel>
/*Controller code*/
public List <String> getTableDisplayNames(){
        List <String> rtnList = new List<String>();
        
        for(String displayName:displayNames.values())
       {
            rtnList.add('-' + displayName);
        }
        return rtnList;
    }
Thanks
Rohitha

 
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