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
Satyajit SinghSatyajit Singh 

how to fix a header of apex column

Hi,
I need that my column header value in a pagebloack table in vf page should be fixed while scrolling and viewing data.
How to do this?

Thanks in Advance!
Shaijan ThomasShaijan Thomas
can you put the code here. I think Output panel will help on this
Shaijan ThomasShaijan Thomas
Can you try the following

<apex:outputPanel id="panelId" style="height:180px;width:100%;overflow:auto;}" layout="block"> Put your code block here
</apex:outputpanel>

Thanks
Shaijan
Satyajit SinghSatyajit Singh
Hi Thomas,

I want my my column headers of a page block table to be fixed.. 
for e.g. Contact Name, Email ID, Phone Number..
This code is not working
Satyajit SinghSatyajit Singh
If I'm scrolling a table to view the data, then the column headers like 
Contact Name, Email ID, Phone Number.. should be fixed at their position..
Grazitti TeamGrazitti Team
Hi Shaijan,

You will have to achieve this using jQuery.
Check out the link below:
http://salesforce.stackexchange.com/questions/1892/how-do-i-support-scrolling-and-lock-freeze-the-header-row-of-a-pageblocktable

Hope this will help.

--
Regards,
Grazitti Team
Web: www.grazitti.com
Email: sfdc@grazitti.com
Shaijan ThomasShaijan Thomas
I have done this. Can you put the code I can help you
 
Satyajit SinghSatyajit Singh

Hi Shaijan,
Please find below my code:
-----------------------

<apex:page >
<apex:form>
<apex:pageBlock controller = "contactDataController">
        <apex:outputPanel id="panelId" style="height:180px;width:100%;overflow:auto;}" layout="block">
            <apex:pageBlockTable value="{!contactList}" var="item" title="Contact List" id="table123" > 
                <apex:column value="{!item.firstname}"/>
                <apex:column value="{!item.lastname}"/>
                <apex:column value="{!item.email}"/>
                <apex:column value="{!item.phone}"/>
            </apex:pageBlockTable>
        </apex:outputPanel>
    </apex:pageBlock>
</apex:form>
</apex:page >

 
PreeSFDCDevPreeSFDCDev
Hi Satyajit/Shaijan,

Are you able to resolve this? I am facing the similar issue to fix the column header of table in vf.
Satyajit SinghSatyajit Singh
Hi, It is not possible in vf Page block table. I’m able to fix the table header using html table and some jQuery resource in vf page. Regards, Satyajit
PreeSFDCDevPreeSFDCDev
Hi Satyajit, Thanks for reply. Is that possible for you to share the code (Jquery) or link which you referred . I got few forums and post related to this but not able to fix the issue.
Satyajit SinghSatyajit Singh
Hi PreeSFDCDev,
I forgot the link from where I got the jquery resources. if it is really urgent for you then send me your email Id. I will send you the code and jquery resources which I'm currently using.

Satyajit
PreeSFDCDevPreeSFDCDev
Thanks a lot Satyajit. Can you please share the code at sandeep.iitk@gmail.com