Posted 17 July 2019, 2:48 pm EST
Hi!
I have a flexgrid with column groups. I’ve set the header background colors as I wish. However, when I press F12 to view the browser console, or I scroll the grid, the background colors of the group headers change. I don’t detect any code running in my app that might be causing it.
Here is the code I use to set the colors:
let chart_palette = wijmo.chart.Palettes.standard;;
let color_index = 0;
grid.itemFormatter = function (panel, r, c, cell) {
if (panel.cellType == wijmo.grid.CellType.ColumnHeader && r == 0) {
for (let i = 0; i < raw_data.all_games.length; i++) {
if (panel.columns[c].binding == 'games[' + i + '].sold_count') {
cell.style.setProperty("background-color", chart_palette[color_index]);
color_index++;
}
}
}
}
I use the standard palette to keep the group header colors consistent with some line charts I use on the same page in order to keep the data more easily visually identifiable for the user. But the changing colors in the headers is ruining my efforts!
Thanks!
Joe