Why doesn't jqGrid cellattr style seem to work in IE 7 (but works fine in IE8 and FF)
i use the following code in my jqgrid colmodel:
cellattr: function (rowId, tv, rawObject, cm, rdata) { return 'style="background-color:LightGray"'; },
which works perfect in Firefox and IE8 (see image):
b开发者_运维知识库ut in IE7 it doesn't seem to work as the backcolor stays white:
here is an example of the html that gets generated when i do view current selection source:
<td role="gridcell" style="text-align: right; background-color: LightGray;" title="199,458" aria-describedby="treegrid_dealsCurrent">
doesn't anyone know if this is a bug in jqgrid or if there is something specific you need to do in IE7 to get this working ?
Have you tested with
cellattr: function (rowId, tv, rawObject, cm, rdata) { return 'style="background:LightGray"'; }
I.e. with just "background".
I had the same problem: cellatr was working with chrome and Firefox but not with IE8 or IE9. Solution for me was to add a space before the style:
return ' style="background-color:LightGreen;color:LightGreen;" '
Cheers
精彩评论