Results 1 to 2 of 2

Thread: TO disable Ext.ux.form.field.NewSelectGroupBox

  1. #1
    Sencha User
    Join Date
    Jun 2017
    Posts
    13
    Vote Rating
    0
      0  

    Default TO disable Ext.ux.form.field.NewSelectGroupBox

    Hi,
    I'm new to ext js. I've a severe requirement. I've two select dropdown boxes, _getSelectBox and getTestComboBox. These two boxes give two different lists. Initially, getTestComboBox is disabled. On click of any value of _getSelectBox I'll have to load value into getTestComboBox and enable getTestComboBox. How do I do this? I couldn't find any query related to this in the forum.




    _getSelectBox: function(Data) {



    var store = Ext.create('Ext.data.Store', {
    fields: ['id', 'name', 'projectId', 'allInGroup']
    });


    store.loadData(Data);


    return Ext.create('Ext.ux.form.field.NewSelectGroupBox', {
    anchor: '75%',
    minListWidth: 150,
    flex: 1,
    name: 'Types',
    queryMode: 'local',
    store: store,
    matchFieldWidth: false,
    triggerAction: 'all',
    fieldLabel: _translate(" Group"),
    labelWidth: this.labelWidth,
    enableKeyEvents: true,
    reorderable: false,
    allInGroupField: 'allInGroup',
    editable: false,
    displayField: 'name',
    valueField: 'id',
    id: 'id',
    checked: true,
    emptyText: _translate("Choose group"),
    multiSelect: true,
    allInGroup: true,
    listeners: {
    change: this._onChange,
    select: this._onChange,
    scope: this
    }
    });




    },


    _onChange : function () {



    this.getTestComboBox(this.store.testData).disabled = true;
    },

    getTestComboBox: function(testData) {

    var store = Ext.create('Ext.data.Store', {
    fields: ['id', 'name', 'allInGroup']
    });


    store.loadData(testData);


    return Ext.create('Ext.ux.form.field.NewSelectGroupBox', {
    anchor: '75%',
    minListWidth: 150,
    flex: 1,
    name: 'testTypes',
    queryMode: 'local',
    store: store,
    matchFieldWidth: false,
    triggerAction: 'all',
    fieldLabel: _translate("Select data"),
    labelWidth: this.labelWidth,
    enableKeyEvents: true,
    reorderable: false,
    allInGroupField: 'allInGroup',
    editable: false,
    displayField: 'name',
    valueField: 'id',
    id: 'elementId',
    checked: true,
    emptyText: _translate("Choose data"),
    multiSelect: true,
    allInGroup: true
    });
    },

  2. #2
    Sencha User
    Join Date
    Jun 2017
    Posts
    13
    Vote Rating
    0
      0  

    Default

    I've set the disabled attribute for the second select box as true. And I'll have to make it to true on change event of first select box

Similar Threads

  1. enable/disable Ext.form.field.file
    By nicolabaldo in forum Ext: Discussion
    Replies: 6
    Last Post: 21 Sep 2012, 5:16 AM
  2. Disable field inside a form component
    By juandiegoh in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 19 Aug 2012, 12:44 PM
  3. Ext 4.1 disable form field
    By EmCy90 in forum Ext: Q&A
    Replies: 1
    Last Post: 14 May 2012, 4:59 AM
  4. [4.0.1] Ext.form.field -> disable()
    By tobiu in forum Ext:Bugs
    Replies: 0
    Last Post: 8 Jun 2011, 4:44 AM
  5. form.getValues does not get the value of a disable field
    By medley in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 24 Sep 2008, 3:16 AM

Posting Permissions

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