Categories | Question details Back To List | ||
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. Because 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 (using setOnLoadingEnd) and each time the user scrolls (using setOnScrollHandler), since the data isn't put on the grid until it is visible. 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. Thus, 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. Thanks Jong Bor Answer posted on Jul 11, 2007 19:19 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. grid.attachEvent("onCellChanged",function(rid,cind,val){ }); Answer posted by radyno (Support) on Dec 09, 2014 18:51 If you haven't found the needed information there and still looking for a solution, you will find the additional help checking autocomplete combo box and javascript messagebox. |