From the “long” problem description which you posted it is not clear whether you need to set the cell color or the row color. About different ways of changing of the cell color see here.
If you need change the row color you should take in the consideration that the rowid (the value “3” in your example) is just the id of the
element of the grid so you can get it with jQuery(“#list”).find(“tr#3”) or just with jQuery(“#3”). So you can change the background color on the row directly. You should take in consideration that other classes of the row like 'ui-widget-content' could has background-image can disturb the background collor changing. So you have some options to fix the problem: see here, here and here