这是我编码的方式,请帮我禁用特定列:
listeners: {
beforeedit: function(obj) {
debugger;
var c = obj.record.get('quarterlyreview1');
if(c==="Approved") {
var d = obj.record.get('quarterlyprogress1');
obj.record.cancelEdit();
}
// return obj.record.get('status');
// you can update the above logic to something else
// based on your criteria send false to stop editing
}
},
答案 0 :(得分:0)
根据the Documentation,如果beforeedit
返回false
,则停止编辑
(此代码适用于V4和V5)
listeners: {
beforeedit: function(editor, context, eOpts) {
debugger;
var c = context.record.get('quarterlyreview1');
if(c==="Approved" && (context.colIdx==0 || context.colIdx==1)) {
return false;
}
// return context.record.get('status');
// you can update the above logic to something else
// based on your criteria send false to stop editing
}
},