1 var ShowAlarmColor = new Jfunction(J.use.dataItem) 2 { 3 J.debugger, 4 (J.var.colStyle="<div style='background: #eeeeee;margin:0px; padding:0px'> " + J.use.dataItem.CheckStandard + "</div>"), 5 new Jswitch(J.use.dataItem.ALARMLEVEL) 6 { 7 new Jcase(0){ (J.use.colStyle="<div style='background: #eeeeee;margin:0px; padding:0px'> " + J.use.dataItem.CheckStandard + "</div>"),J.@break}, 8 new Jcase(1){ (J.use.colStyle="<div style='background: #00FF00;margin:0px; padding:0px'> " + J.use.dataItem.CheckStandard + "</div>"),J.@break}, 9 new Jcase(2){ (J.use.colStyle="<div style='background: #FFFF00;margin:0px; padding:0px'> " + J.use.dataItem.CheckStandard + "</div>"),J.@break}, 10 new Jcase(3){ (J.use.colStyle="<div style='background: #FFAAFF;margin:0px; padding:0px'> " + J.use.dataItem.CheckStandard + "</div>"),J.@break}, 11 new Jcase(4){ (J.use.colStyle="<div style='background: #FF3333;margin:0px; padding:0px'> " + J.use.dataItem.CheckStandard + "</div>"),J.@break}, 12 }, 13 J.@return(J.use.colStyle), 14 };
修改数据源后调用refresh方法
grid.GetJQuery().refresh(),