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

problem with pageblocktable header css

Hi all


i have applied a scroll for the pageblocktable using a ouputpanel but now i want to freeze the header of the pageblock table for that i googled and found that by using css we can do so and i tried the css on the headerclass it is not working when i tried to apply color to the text it worked, seting the position to fixed also worked but then freezing the header does not work i do not get an idea wat is the problem. plz help me

below is the code:

<apex:page Controller="mycontroller">
.headerRow .headerStyle
     color: #CC0000 !important; 
     TOP: expression(this.offsetParent.scrollTop-2);         

     <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" headerclass="headerStyle">
                    <apex:column value="{!item.password__c}" ></apex:column>                                         






Try adding this style and use a table whith headerRow class to display the headings alone


<table BORDER="1" cellspacing="1" class="list" >
                 <tr class = "headerRow">
                     <th  class = "headerRow" width = "100px">blah</th>




 <apex:column value="{!item.password__c}" headervalue = ""></apex:column> 


This worked for me!





Did you get any solution to freeze the header in page block table.


I am using a div  and made the div scrollable.My pageblocktable is inside that div.


The scrolling is working fine.but i want to freeze the header in the pageblocktable.


Please help if u get any solution to this.



Thanks in advance