+ Start a Discussion
MeerMeer 

Remove Column Header

Hi.. 

 

I have the following page

 

<apex:page controller="ValueManager" showheader="false">

<apex:pageblock >
<apex:pageblocktable value="{!Value}" var="par">

<apex:column headervalue="Parent Value">
<apex:outputtext value="{!par.Name}"/>
</apex:column>

<apex:column headervalue="Child Value">
<apex:pageblocktable value="{!par.Child_Parent_Value__r}" var="ch">
<apex:column value="{!ch.Name}" headervalue="Value"/>
<apex:column value="{!ch.VSDesc__c}" headervalue="Description"/>
</apex:pageblocktable>
</apex:column>

<apex:column headervalue="Description">
<apex:outputtext value="{!par.VSDesc__c}"/>
</apex:column>

</apex:pageblocktable>
</apex:pageblock>

</apex:page>

 

I want to remove the headers of the 'Child Value' i.e 'Value' and 'Description' if no record exist...

 

Can anyone tell me how can it be done?? 

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
craigmhcraigmh

Use the rendered attribute of the element(s) that you want hidden.

 

 

rendered="Value.size>0"