Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selected row background color

I'm using jqgrid with jquery-ui 'smoothness' theme, unfortunately with this theme the selected row background color is too light, I'm trying to change the background color to make it more visible. I've tried changing ui-state-highlight in css (with !important override) but this does not work. Is there a CSS way to do this or perhaps a jqgrid custom formatter is the way to go?

like image 511
Jeff Avatar asked Nov 29 '10 15:11

Jeff


2 Answers

The class ui-state-highlight uses the background CSS attribute. So a small trick is to use background instead of background-color to remove the background image. For example

.ui-state-highlight { background: yellow !important; }

see live here.

UPDATED: It's not necessary to use !important. It's enough to specify a more specific rule like

.ui-jqgrid-btable .ui-state-highlight { background: yellow; }

or

.ui-jqgrid .ui-state-highlight { background: yellow; }
like image 113
Oleg Avatar answered Sep 20 '22 19:09

Oleg


jQuery('#jqGrid').find('.ui-state-highlight').css('background', 'skyblue');

You can add like this in your jquery file

like image 26
Pran Avatar answered Sep 17 '22 19:09

Pran