You need to sign in to do that
Don't have an account?

Using 'rendered' in apex column stops 'headerValue' being displayed
I have a pageBlockTable with a number of columns.
If I use 'rendered' in a column, then the headerValue no longer displays. Eg:
<apex:column headerValue="Program" value="{!program.Program_Public_Name__c}"/> THIS SHOWS THE HEADER LABEL
<apex:column headerValue="Program" value="{!program.Program_Public_Name__c}" rendered="{!IF(program.Program_Status__c == 'Applications Open', true, false)}"/> NO HEADER LABEL FOR THIS
Any idea why?
Thanks
If I use 'rendered' in a column, then the headerValue no longer displays. Eg:
<apex:column headerValue="Program" value="{!program.Program_Public_Name__c}"/> THIS SHOWS THE HEADER LABEL
<apex:column headerValue="Program" value="{!program.Program_Public_Name__c}" rendered="{!IF(program.Program_Status__c == 'Applications Open', true, false)}"/> NO HEADER LABEL FOR THIS
Any idea why?
Thanks
Try Below Code.
<apex:column headerValue="Program">
<apex:outputText value="{!program.Program_Public_Name__c}" rendered="{!IF(program.Program_Status__c == 'Applications Open', true, false)}">
</apex:outputText>
</apex:column>
Please Mark this as BEST ANSWER if it solves your issue.
All Answers
<apex:column headerValue="Program" value="{!program.Program_Public_Name__c}" rendered="{!IF(program.Program_Status__c == 'Applications Open', true, false)}"/>
in this column using 'rendered' attribute so whenever program_Status__c='Applications Open' then only the column will be display on the page.else entire column will be in hidden .So if you want header value separatly then you can take another html table for headers on top of pageBlockTable and remove the header values in column .
Ex: <table>
<th> program </th>
</table>
<apex:pageblacktable>
<apex:column headerValue="Program" value="{!program.Program_Public_Name__c}" rendered="{!IF(program.Program_Status__c == 'Applications Open', true, false)}"/>
</apex:pageblacktable>
Thanks ,
Shiva.
Try Below Code.
<apex:column headerValue="Program">
<apex:outputText value="{!program.Program_Public_Name__c}" rendered="{!IF(program.Program_Status__c == 'Applications Open', true, false)}">
</apex:outputText>
</apex:column>
Please Mark this as BEST ANSWER if it solves your issue.