Results 1 to 2 of 2

Thread: chnage combobox config from controller

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Location
    Finland
    Posts
    16
    Vote Rating
    0
      0  

    Default chnage combobox config from controller

    I have a grid with combobox editor and I want to change its editable config at run time. Here is my code. The problem is that the change to the config takes place at the second click on the grid (one click behind). How can I control the config one level earlier?

    Code:
     'PropertyToDTWindow dtpropertylist: {
                    itemclick: this.doSelectPropertyGrid,
     }
    
    
        doSelectPropertyGrid: function(record, item, index, e, eOpts) {
            var me = this;
              var idProperty = item.get('idProperty');
            me.getFormInitCombo().getStore().load({params: {idProperty: idProperty},
                scope: this,
                callback: function(records, operation, success) {
                    if (records.length < 2) {
                        Ext.apply(me.getFormInitCombo(), {editable: true});
    
    
                    }
                }
            })
    }
    Code:
    {
                    xtype: 'gridcolumn',
                    dataIndex: 'initialValue',
                     editor: {
                        xtype: 'combobox',
                            name:'initCombo',
                            store: 'InitialValue',
                            displayField: 'value',
                            valueField: 'value',
                            queryMode: 'local',
                            allowBlank: true,
                            editable:false,
                    },
               
                    text: 'initial value',
    
    
                }

  2. #2
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99
    Vote Rating
    46
      0  

    Default

    beforeitemclick( this, record, item, index, e, eOpts )
    Fires before the click event on an item is processed. Returns false to cancel the default action.
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •