Posted 22 November 2017, 3:49 am EST
A while back I have post a question about conditional format on cells. What I am trying to achieve is, if cell value is equal to zero, then make font color matching current cell background thus it look like the cell is empty. Since I use [autoGenerateColumns]=“true” and I was told to use:
for (let c = 0; c < flex.columnflex.length; c++) {
flex.columns[c].isRequired = false;
for (let r = 0; r < flex.rowflex.length; r++) { if (flex.getCellData(r, c, false) === 0) { flex.setCellData(r, c, null, false, false); } }
}
this works great except is the entire column is null, thus that column is also unloaded from the flexgrid, meaning instead of 52 columns grid, it it now 51. Is the a way I can keep the above conditional format method and keep the column or there is another way just to change the font color to match current cell background, That means the column will remain in the grid. I am having some coding issue because of missing column. Thank yo very much.