Working with visible rows

I need to check that some condition holds for every cell in a grid. If
this condition fails, I must change the background color of the cell.

I am using smart rendering, I can’t check all cells at once. Instead, I
must check this condition every time new data is loaded from server
setOnLoadingEnd) and each time the user scrolls (using
setOnScrollHandler), since the data isn’t put on the grid until it is

The function called when loading ends isn’t very
useful, because it counts how many rows were loaded, but it doesn’t say
which, so I don’t know
which rows to check. The function called when
the user scrolls isn’t very useful either, because I don’t know which
rows are visible.

Because of these problems, I must go through
every cell, using a try-catch block in order to detect cells which
don’t exist yet. This isn’t elegant and it
consumes CPU, making scrolling very slow.

I would like to know whether there is some way to find out which rows
are visible, in order to update them only. Or maybe there is another
kind of workaround to
this problem. I will hear any suggestions.

Jong Bor

To check row visibility next code can be used
    if (this.getRowById(ID)){
       //row exists

Also in your case, if you need validate EACH cell in grid, you can use onCellChanged event, this event fire on each cell modification , including initial loading from XML, so after row loaded in grid by any way it will fire such event for all cells with valur in it.