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
SimrinSimrin 

Removing header from PageBlockTable

Hello,

Even after i delete the headerValue from Column, I can still see a thin header consuming space.
<apex:pageblocktable value="{!pList}" var="item">
    <apex:column headerValue="test"/>
</apex:pageblocktable>

 
Best Answer chosen by Simrin
SaranshSaransh
You can delete it using jquery:
 
<apex:page sidebar="false" showHeader="false" standardController="Account">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
<script>
$( document ).ready(function() {
    $( "th" ).remove( "th" );
});
</script>
<apex:pageBlock >
  <apex:pageblocktable value="{!Account.contacts}" var="item">
    <apex:column value="{!item.name}" headerValue=""/>
    <apex:column value="{!item.phone}" headerValue=""/>
</apex:pageblocktable>
</apex:pageBlock>
</apex:page>

 

All Answers

SaranshSaransh
You can delete it using jquery:
 
<apex:page sidebar="false" showHeader="false" standardController="Account">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
<script>
$( document ).ready(function() {
    $( "th" ).remove( "th" );
});
</script>
<apex:pageBlock >
  <apex:pageblocktable value="{!Account.contacts}" var="item">
    <apex:column value="{!item.name}" headerValue=""/>
    <apex:column value="{!item.phone}" headerValue=""/>
</apex:pageblocktable>
</apex:pageBlock>
</apex:page>

 
This was selected as the best answer
SimrinSimrin
works like a Charm. Thank you vm