You need to sign in to do that
Don't have an account?
Swayamprava
Freeze the pageblock table (with scroll bar) header.
Hi
I have a pageblock table on a Vf page with a scrollbar.
please anybody can help me to fix the header.
I know it is possible through java script. So if anybody can share the javescript with me?
Hi,
Try the below code snippet as reference:
<apex:page standardController="Opportunity" recordSetVar="opportunities">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:outputpanel style="overflow:scroll;height:250px;" layout="block">
<apex:pageBlockTable value="{!opportunities}" var="opp">
<apex:column value="{!opp.name}"/>
<apex:column headerValue="Stage">
<apex:inputField value="{!opp.stageName}"/>
</apex:column>
<apex:column headerValue="Close Date">
<apex:inputField value="{!opp.closeDate}"/>
</apex:column>
</apex:pageBlockTable>
</apex:outputpanel>
</apex:pageBlock>
</apex:form>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi ,do u need to mention the below style.
<apex:outputpanel style="overflow:scroll;height:250px;" layout="block">
Thanks for your reply. But already i have tried this . This is only to put a scroll bar , not to freeze the header. I know that it is possible using a j query. but i donot have any idea about jquery.
Hi,
U need to use this to achieve scollable header:
http://jeromebulanadi.wordpress.com/2010/03/22/scrollable-fixed-header-table-a-jquery-plugin/
I implemented in VF pages and works great.
Thanks & Regards,
Vivek V.
http://apexfixheader.blogspot.in/