Posted 21 August 2019, 3:11 pm EST
Hi!
I’ve researched this topic and found this thread:
https://www.grapecity.com/forums/wijmo/flexgrid-scrolling-error_1
And I don’t understand the solution there.
The author describes exactly the problem I’m seeing on my own grid. I’m using AngularJS. To reiterate the problem: I set the background color of some cells according to the value contained in the cell (I set the background color of cells with higher values and do not set the background color of cells with lower values). This works exactly as I intended but when I scroll the grid vertically or horizontally, the background colors of other cells change.
Here is my code:
grid.itemFormatter = function (panel, r, c, cell) {
if (wijmo.grid.CellType.Cell == panel.cellType && panel.columns[c].header != SOME_TEXT) {
if (Number(grid.getCellData(r, c, false) >= SOME_VALUE_THRESHOLD) {
cell.style.backgroundColor = '#fd8d18';
}
}
}
I understand the grid “recycles cells” but I don’t know what that means or how to work around it. Your help is appreciated.
Joe