美好的一天,我有一张桌子,我在其中使用了划线功能,我有这一栏:
{
text: 'CPL Object',
dataIndex: 'CPLObj',
flex: 1,
editor: {
allowBlank: false
}
}
现在,我想让此列可编辑,只有当其他列具有特定值时,假设'model'
列的值为'CPU'
。否则我想没有这个值的编辑器。
这可能吗?
答案 0 :(得分:1)
你的意思是你使用网格?您是否尝试在viewModel上添加公式,以检查要检查的模型列是否具有值?也许是这样的:
Viewmodel:
checkvalue: function(get){
var x = true;
if (get('current.model' !== ''){
x = false
}
return x;
}
ViewController: (on your binding)
column: {
readonly: '{checkvalue}'
}