在jsp中的javascript加入一下代码
$('#initial_callbackList') // datagrid id .datagrid( { rowStyler : function(index, row) { if (row != null) { if (row.lxNeedFeedback == "T") { //lxNeedFeedback 是判断值的字段 return 'background-color:white;color:black;'; } if (row.lxNeedFeedback == "R") { return 'background-color:yellow;color:blue;font-weight:bold;'; }
if (row.lxNeedFeedback == "S") { return 'background-color:green;color:blue;font-weight:bold;'; }
if (row.lxNeedFeedback == "F") { return 'background-color:pink;color:black;'; } } } });
|