简体   繁体   中英

Dojo Dgrid - canedit on filteringselect

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM