小记:
Ext的EditorGridPanel是基于列模型的,因此很容易禁用一列。但如果要根据条件禁用某一行,可以使用如下方法:
grid.on("beforeedit",function(e){
var currRecord = e.record;
if(!currRecord.get('xxx') 或者其他判断条件){
e.cancel = true;
}
});
本文介绍如何在ExtJS的EditorGridPanel中根据特定条件禁用行编辑功能。通过监听beforeedit事件并检查记录的数据来实现这一目的。
小记:
Ext的EditorGridPanel是基于列模型的,因此很容易禁用一列。但如果要根据条件禁用某一行,可以使用如下方法:
grid.on("beforeedit",function(e){
var currRecord = e.record;
if(!currRecord.get('xxx') 或者其他判断条件){
e.cancel = true;
}
});

被折叠的 条评论
为什么被折叠?