0

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...

ps202
  • 95
  • 2
  • 11
  • If I add "click" at the end, I get the desired functionality, but then the filteringselect displays the values (1, 2, 3 and so on), and not the labels before I click on the select... – ps202 Nov 06 '13 at 08:26

1 Answers1

0

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?

undefined
  • 2,051
  • 3
  • 26
  • 47
  • I haven't tried `set('disabled', true)` yet. I will give it a go, and share the results with you. Thanks for your comment! – ps202 Nov 08 '13 at 09:34