mygrid.setRowColor change

mygrid.setRowColor works fine in the first page (according to given conditions) but on viewing the 2nd page and further it doesnt work.
Any solutions or suggestions will be appreciated… Thanks in advance

setRowColor() method can be applied only to a rows that are rendered in the grid.
In case of using smart rendering or paging only the visible area/current page renders.

You may try to set the row color right in your xml:

<row id="12" class="css1" bgColor="red" style="color:blue;"> <cell> first column data </cell> <cell class="css2" style="font-weight:bold;"> second column data </cell> </row>