I'm trying to display a column using a 'Team' field, if Team = SMB I wanted the column to display else hide it. When I use the code below the column values are rendering like I wanted but the header value is not displaying in either cases (If team = SMB or not) So I've tried using the following code -

 <apex:pageblockTable value="{!shoppingCart}" var="s">    
<apex:column rendered="{!s.Opportunity.Team__c=='SMB'}">
                        <apex:facet name="header">SMB Hard Floor</apex:facet>                      
                        <apex:inputField value="{!s.SMB_Hard_Floor__c}" style="width:70px" required="false" onkeyup="refreshTotals();"/> 

Am I doing something wrong here? Here is an image when Team = SMB (Missing header name =SMB Hard Floor) Missing Header value but the column values are in

When Team != SMB No Column displayed -which is what I wanted

  • You should be wrapping that, you will have greater control over the objects your trying to show
    – EricSSH
    Oct 14, 2016 at 22:11
  • I don't know exactly the logic in detail behind the component apex:pageblockTable, but the condition <apex:column rendered="{!s.Opportunity.Team__c=='SMB'}"> based on "s" that is a dynamical variable, is not the best. Try to have a single variable that set the visibility, it should solve the problem.
    – Klodj_Meta
    Oct 15, 2016 at 0:39

1 Answer 1


This is a bug with expression syntax in apex:column.

If you use directly false the column does not render while if the expression evaluates to the true then the column headers still disappear

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .