Have you tried setting up a onChange
handler in the widgetArgs
?
Something like:
onChange: function(newValue) { if(newValue === 10) { this.set('disabled', true); } }
But how would the widget get re-enabled?
Вопрос
I have a dgrid assigned to a REST service with JSON. It works fine.
I have a filterselect in one of the columns. The filterselect is populated from another dojo store.
My question is, how can I disable the filterselect when it's value is for example 10?
I tried canEdit, but it does not work.
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
?
Something like:
onChange: function(newValue) { if(newValue === 10) { this.set('disabled', true); } }
But how would the widget get re-enabled?