开发者

Why doesn't jqGrid cellattr style seem to work in IE 7 (but works fine in IE8 and FF)

开发者 https://www.devze.com 2023-03-21 16:15 出处:网络
i use the following code in my jqgrid colmodel: cellattr: function (rowId, tv, rawObject, cm, rdata) { return \'style=\"background-color:LightGray\"\'; },

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):

Why doesn't jqGrid cellattr style seem to work in IE 7 (but works fine in IE8 and FF)

b开发者_运维知识库ut in IE7 it doesn't seem to work as the backcolor stays white:

Why doesn't jqGrid cellattr style seem to work in IE 7 (but works fine in IE8 and FF)

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

0

精彩评论

暂无评论...
验证码 换一张
取 消