• Niz R
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi all

I have used a pageblocktable in my visualforce page and applied a scrollbar for that by using ouputpanel styleClass but this applies a scroll for the entire table where as i whant to freeze my table header and apply scroll for only the data part how can i do that.

here is my code:

<apex:page Controller="mycontroller">
<style>
.container
{
   overflow:auto;  
   height:50px;  
   align:bottom;
}
</style>
     <apex:form >
        <apex:pageBlock title="My Content" mode="edit">
           <apex:pageBlockSection title="My Content Section" columns="1"   > 
               <apex:outputPanel layout="block" styleClass="container"  >           
                <apex:pageBlockTable value="{!temp}" var="item" align="top" width="100%" columns="10" >
                    <apex:column value="{!item.password__c}" ></apex:column>
                    <apex:column value="{!item.password__c}"></apex:column>  
                    <apex:column value="{!item.password__c}"></apex:column> 
                    <apex:column value="{!item.password__c}"></apex:column> 
                    <apex:column value="{!item.password__c}"></apex:column> 
                    <apex:column value="{!item.password__c}"></apex:column>
                    <apex:column value="{!item.password__c}"></apex:column>                      
                </apex:pageBlockTable>
             </apex:outputPanel>           
            </apex:pageBlockSection>
         </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

 

  • September 21, 2010
  • Like
  • 1