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
Caleb_SidelCaleb_Sidel 

pageBlockTable - issues rendering in IE

We had a nice pageBlockTable like so:
 
    <apex:pageBlockTable value="{!RecordView}" var="record" id="record">
    <apex:column headerValue="Name" value="{!record.RecordName}"/>
    <apex:column headerValue="Pages" value="{!record.Pages}"/>
    </apex:pageBlockTable> 
 
And it worked great in Firefox, but failed in IE. The problem was if Pages was ever null the table rendered without a line under that cell. So the table looked very strange. The question, how to get a white space into the value instead of nothing?
 
We changed it to:
    <apex:pageBlockTable value="{!RecordView}" var="record" id="record">
    <apex:column headerValue="Name">&nbsp;{!record.RecordName}</apex:column>
    <apex:column headerValue="Pages">&nbsp;{!record.Pages}</apex:column>
    </apex:pageBlockTable>  
 
Maybe we could have modified the Controller, however we fixed it in the page, it works, so I thought I'd share. Please comment if you have other solutions, or thoughts, or...well...comments.
 
Thanks,
Caleb
Best Answer chosen by Admin (Salesforce Developers) 
sham_2sham_2

Hi Caleb,

 

You are correct, IE doesn't renders styles for a cell which has no content.

you can add an IF in VF to conditionally render the &nbsp;

 

 <apex:column headerValue="Pages">{!IF(ISNULL(record.Pages),'&nbsp;'record.Pages}</apex:column>