我想为剑道网格中的某些行(不是全部)设置可编辑的 false 。我该怎么做 ?有没有办法从外部设置网格行属性。当网格行数据绑定时,我将捕获行。但我不知道将行可编辑设置为 false。
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";
}
}
}
请帮忙。谢谢 !:)