[英]how to disable particular column of grid based on other value of column in extjs
这是我的编码方式,请帮助我禁用特定的列:
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
}
},
根据文档,如果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
}
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.