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
The_London_ScottThe_London_Scott 

How can I force display of headerValue header in row 2 of pageBlockTable?

The code below displays eight fields from account in a Visualforce page used as a custom console component in opportunity page layouts. All but two of these fields are enabled for inline editing.

The first row of five fields displays its row of headerValue column headers correctly. The second row of three fields displays the column values, but not the headers (Vertical Tier 1, Vertical Tier 2, etc.). What am I doing wrong?

Also asked as Stackexchange question here (https://salesforce.stackexchange.com/questions/97186/how-can-i-force-display-of-headervalue-header-in-row-2-of-pageblocktable).
 
<!-- render key account fields pulled by query in acctInfo method of custom extension -->
 <!-- saveAccount method of extension handles DML -->
 <apex:form >
   <apex:pageBlock title="Account Info" id="acctInfo" mode="inlineEdit" >
     <apex:pageBlockButtons location="top" >
       <apex:commandButton action="{!saveAccount}" value="Save" />
     </apex:pageBlockButtons>
     <apex:outputPanel id="accountInformationPanel">
       <apex:pageBlockTable id="AcctTable" title="Acct Info" value="{!acctInfo}"
        var="a" columns="5" rows="2" width="100%">
         <apex:column value="{!a.Account_Type__c}"/>
         <apex:column value="{!a.BillingCountry}"/>
         <apex:column headerValue="Industry">
           <apex:outputField value="{!a.Industry}">
             <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                 hideOnEdit="editButton" event="ondblclick"
                 changedStyleClass="myBoldClass"
                 resetFunction="resetInlineEdit"/>
           </apex:outputField>
         </apex:column>
         <apex:column headerValue="Subindustry">
           <apex:outputField value="{!a.Subindustry__c}">
             <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                  hideOnEdit="editButton" event="ondblclick"
                  changedStyleClass="myBoldClass"
                  resetFunction="resetInlineEdit"/>
           </apex:outputField>
         </apex:column>
         <apex:column headerValue="Employees">
           <apex:outputField value="{!a.NumberOfEmployees}">
             <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                 hideOnEdit="editButton" event="ondblclick"
                changedStyleClass="myBoldClass"
                resetFunction="resetInlineEdit"/>
           </apex:outputField>
         </apex:column>
         <apex:column breakBefore="true" headerValue="Vertical Tier 1">
           <apex:outputField value="{!a.Vertical_Tier_1__c}">
             <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                 hideOnEdit="editButton" event="ondblclick"
                 changedStyleClass="myBoldClass"
                 resetFunction="resetInlineEdit"/>
           </apex:outputField>
          </apex:column>
          <apex:column headerValue="Vertical Tier 2"> 
            <apex:outputField value="{!a.Vertical_Tier_2__c}">
              <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                  hideOnEdit="editButton" event="ondblclick"
                  changedStyleClass="myBoldClass"
                  resetFunction="resetInlineEdit"/>
            </apex:outputField>
          </apex:column>
          <apex:column headerValue="Vertical Tier 3">
            <apex:outputField value="{!a.Vertical_Tier_3__c}">
              <apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
                  hideOnEdit="editButton" event="ondblclick"
                  changedStyleClass="myBoldClass"
                  resetFunction="resetInlineEdit"/>
            </apex:outputField>
          </apex:column>
       </apex:pageBlockTable>
       </apex:outputPanel>

 
JoreeBabu KodiJoreeBabu Kodi
Hi The_London_Scott,

Can you please remove breakbefore attribute in the line 37, and let you try again.

before:   <apex:column breakBefore="true" headerValue="Vertical Tier 1">
instead of above line:    <apex:column  headerValue="Vertical Tier 1">

Hope this will work to you!!

Regards
JoreeKodi
joreekodi@gmail.com
 
The_London_ScottThe_London_Scott
Hi JoreeKodi,

Removing breakBefore causes all eight colums to be rendered in one row, despite the rows="5" attribute of the pageBlockTable. Also the headers of the last three fields do not render.