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
SFDC NINJASFDC NINJA 

Visualforce - Adding Scroll bar BlockTable

I'm displaying my records in a blocktable. I would like to limit 10 records visible to the user at a time and the user can scroll down to see the rest. How can I achieve this? Thanks
Best Answer chosen by SFDC NINJA
Prabhat Kumar12Prabhat Kumar12
Hi you can use Apex:Outputpannel with style attribute to show scrollbar.
 
<apex:page controller="inlineEditSupport">
      <apex:pageBlock >
      <apex:outputPanel layout="block" style="overflow:auto;width:200px;height:50px" >
       <apex:PageblockTable value="{!dates}" var="account">
      <apex:outputText value="{!account.DateField__c}"/>
      </apex:PageblockTable>
      </apex:OutputPanel> 
     </apex:pageBlock>
    </apex:page>
Its working in my ORG hope this will work for you.