setRowColor on only 1 row at a time

Hi there,

I’m setting the bgColor of a row (using mygrid.setRowColor) based on another action. This works fine, except that when this action occurs again and sets the color of a different row, I need the other row to go back to normal (white background).

What would be the most efficient way to do this other than looping through all the rows first to reset their bgColor to white?

I was thinking of using the rowSelected methods instead, and then just altering the CSS for the selected row, but I can’t seem to get that to work, because there is no way to select a row, only a cell.

Any ideas? Thanks!!

What would be the most efficient way to do this other than looping through all the rows first to reset their bgColor to white?
You can save id of the row which background color you have changed at the some variable, and then set background color back only for this one row.

I was thinking of using the rowSelected methods instead, and then just altering the CSS for the selected row, but I can’t seem to get that to work, because there is no way to select a row, only a cel

You can change background color for the selected row and for the selected cell. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … ustom_skin