我想在剑道网格中为某些行(并非对所有人)设置设置可编辑的错误。我该怎么做 ? 有没有办法从外部设置网格行属性。 当网格行数据绑定时,我将捕获行。但我不知道设置行可编辑的错误。
function GridOnDataBound(arg) {
dataView = this.dataSource.view();
var grid = $("#grid").data("kendoGrid");
var rowObjs = grid.tbody[0].rows;
for (var i = 0; i < dataView.length; i++) {
var row = rowObjs[i];
// row.className = "gridWhiteRow";
if (dataView[i].AprPrtyKy === 8941) {//low
// row.className = "gridGreenRow";
}
if (dataView[i].AprPrtyKy === 8940) {//hight
// row.className = "gridYellowRow";
}
if (dataView[i].AprPrtyKy === 8944) {//urgent
row.className = "gridRedRow";
}
if (dataView[i].AprPrtyKy === 8942) {//normal
// row.className = "gridAquaRow";
}
if (dataView[i].AprPrtyKy === 8945) {//normal
// row.className = "gridPurpleRow";
}
if (dataView[i].AprStsKy === 8946) {
row.className = "gridGreenRow";
}
}
}
请帮忙。谢谢 ! :)