質問

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?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top