[英]Dojo Dgrid - canedit on filteringselect
I have a dgrid assigned to a REST service with JSON. 我有一个分配给JSON的REST服务的grid。 It works fine.
工作正常。
I have a filterselect in one of the columns. 我在其中一列中有一个filterselect。 The filterselect is populated from another dojo store.
从另一个dojo商店中填充filterselect。
My question is, how can I disable the filterselect when it's value is for example 10? 我的问题是,当它的值为10时,如何禁用filterselect?
I tried canEdit, but it does not work. 我尝试过canEdit,但是它不起作用。
Any suggestions? 有什么建议么?
Thanks! 谢谢!
Editor({
label: 'Size', autoSave: true, field: 'picsubtype',
canEdit: function(object, value) {
return value != 10;
},
widgetArgs: {
store: filesubtypeStore, maxHeight: 150, style: "height: 20px;"
},
}, FilteringSelect)
This code does not work... 此代码不起作用...
Have you tried setting up a onChange
handler in the widgetArgs
? 您是否尝试过在
widgetArgs
设置onChange
处理程序?
Something like: 就像是:
onChange: function(newValue) { if(newValue === 10) { this.set('disabled', true); } }
But how would the widget get re-enabled? 但是如何重新启用小部件?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.