gpt4 book ai didi

javascript - 为 Kendo 网格中的某些行设置 Editable False

转载 作者:行者123 更新时间:2023-11-30 05:44:06 25 4
gpt4 key购买 nike

我想为剑道网格中的某些行(不是全部)设置可编辑的错误。我该怎么做 ?有什么方法可以从外部设置网格行属性。当网格行数据绑定(bind)时,我将捕获行。但是我不知道将 row editable 设置为 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";
}

}
}

请帮忙。谢谢 ! :)

最佳答案

您可以使用与 this code library article 中介绍的方法相同的方法使行不可点击(点击 + 停止传播)。

关于javascript - 为 Kendo 网格中的某些行设置 Editable False,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18973694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com