It possible to style the filterToolbar in a jqGrid?
I am using jqGrid and want to know if it is possible to style the background of the filterToolbar separately from the rest of the grid.
I've tried:
var $search_toolbar = $("tr.ui-search-toolbar", $("#list")[0].grid.hDiv);
$search_toolbar.css('height', '50');
$search_toolbar.css('background-color', 'Red');
The height get set, but the background-color appears to be overridden by child TH elements.
I then tried cre开发者_运维技巧ating a style:
tr.ui-search-toolbar th{
height:30px;
background-color:Black;
background-image:none;
}
I'm sure I'm missing something obvious, I just can't see what it is.
You can use something like the following
.ui-jqgrid table.ui-jqgrid-htable th.ui-th-column input,
.ui-jqgrid table.ui-jqgrid-htable th.ui-th-column select {
background-color: red
}
see the demo.
精彩评论