jquery easyui datagrid设置行样式 不可删除某行

rowStyler: function (index,row) {
if (parseInt(row.ksrs) > 0)
{
return 'color:red';
}
},
onLoadSuccess:function(data){
var rows = data.rows;
for (var j = 0; j < rows.length; j++)
{
if (parseInt(rows[j]["ksrs"]) > 0)
{
$(".datagrid-row[datagrid-row-index=" + j + "] input[type='checkbox'][name='ksh']")[0].disabled = true;
}
}
}

ksh为主键 当ksrs>0时行变成红色 不可以删除

每天进步一点点
原文地址:https://www.cnblogs.com/miraclesakura/p/3807722.html