Corrected VF code:
<apex:pageBlock ><br/>
<style>
TABLE#showcells {
empty-cells: show
}
</style>
<apex:outputpanel style="height:Auto;" layout="block">
<table class="list" cellspacing="0" cellpadding="0" border="0" id="showcells">
<thead class="rich-table-thead">
<tr class="headerRow">
<td width="115px"> </td>
<td width="95px" align="center">Indicative OG</td>
<td width="95px" align="center">Indicative OU</td>
<td width="95px" align="center">Indicative CSG</td>
<td width="95px" align="center">Indicative Industry</td>
</tr>
</thead>
<tbody>
<apex:repeat value="{!Indicativ}" var="varQuarter">
<tr>
<td class="datacell">{!varQuarter.Qrtr}</td>
<apex:repeat value="{!varQuarter.Value}" var="Value" >
<td class="datacell">{!Value}</td>
</apex:repeat>
</tr>
</apex:repeat>
</tbody>
</table>
</apex:outputpanel>
</apex:pageBlock>
And there is a class INSIDE extension such as:
class arrayIndcValu{
public String Qrtr {get;set;}
public list<string> Value {get;set;}
public arrayIndcValu(){
this.Qrtr = '';
this.Value = new list<string>();
}
}
And "Indicativ" is a list of type of this above class:
public list<arrayIndcValu> Indicativ {get;set;}
"varQuarter" contains values of string like: [PUNE, BANGALORE, NULL, DELHI]
The problem is that for 3rd value, which is null in this array, dataCell is not getting rendered and instead, I get out put in 3 cells only for that row. The repeat iterates only 3 times and skips the null value, hence creating only 3 cells.
Output is like:
PUNE BANGALORE DELHI [no cell rendered, blank space]
Output should be:
PUNE BANGALORE [empty cell] DELHI
How to render this empty cell?