How can I set the background-color of an entire row (not just cell) using the custom formatter?
A:
The custom formatters are used for formatting the cell's data (= text). As far as I know they don't know about the actual cell (meaning a jquery object) but only of it's value.
But usually jqGrid assigns IDs to all rows so setting the background color if you know the rows ID should be only a matter of setting the background color of all td child elements of this row.
$(rowid).children("td").css('background-color', "#5E5E5E");
Daff
2009-11-26 13:42:37
Just curious, have you tried integrating this with a jQuery UI Theme, so the background colors are picked from the theme?
Justin Ethier
2009-12-01 21:36:04
Hm I don't know about any jQuery UI classes that could do that (as far as I know there are only .ui-state-highlight and .ui-state-error that normally have a distinct color). But it would make sense to create additional CSS classes that contain the color information.
Daff
2009-12-02 11:15:04