Results 1 to 2 of 2

Thread: static data store changes

  1. #1

    Default static data store changes

    Hello Gurus,

    I am trying to change the static data store used for combo box , but its not reflecting . Following is the code snippet :

    var nano = Ext.create('Ext.data.Store', {
    fields: ['value', 'name'],
    data : [
    {"value":"", "name":"Any"},
    {"value":"true", "name":"Y"},
    {"value":"false", "name":"N"}
    ]
    });


    Ext.define('Exmaple1.view.NanotechnologyCombo', {
    extend : 'Ext.container.Container',
    alias : 'widget.pmnanotechnologycombo',

    layout : {
    type : 'hbox',
    align : 'middle'
    },
    isStateful : false,
    initComponent : function() {
    var me = this;
    Ext.applyIf(me, {
    items : [{
    xtype : 'label',
    text : 'Nanotechnology:',
    margins : '0 10 0 0',
    forId : 'nanotechnologyInput',
    width : 130
    }, {
    xtype : 'combo',
    store : nanoStore,
    queryMode : 'local',
    displayField : 'name',
    valueField : 'value',
    name : 'nanotechnology',
    itemId : 'nanotechnology',
    inputId : 'nanotechnologyInput',
    fieldLabel : 'Nanotechnology',
    boxLabel : '',
    hideLabel : true,
    submitValue : true,
    stateEvents : ['select', 'change'],
    stateful : this.isStateful,
    stateId : 'nanotechnologycheckbox',
    getState : function() {
    return {
    value : this.value
    };
    },
    applyState: function(state){
    this.setValue(state.value);
    }
    }]
    });


    me.callParent(arguments);
    }


    });
    Now I am defining new store and trying to assign that store to combo

    var nanoStore = Ext.create('Ext.data.Store', {
    fields: ['value', 'name'],
    data : [
    {"value":"", "name":"All"},
    {"value":"true", "name":"Y"},
    {"value":"false", "name":"N"}
    ]


    });

    changing store name to nanoStore and then binding

    combo.bindStore(nanoStore);

    somehow I am not getting changed store values in combo . Any expert advice? Thanks in advance!

  2. #2

    Default

    Sorry wrong Group! posting it in ext 4.X

Similar Threads

  1. static popup data from dynamic store
    By JB3300 in forum Sencha Architect 3.x: Q&A
    Replies: 4
    Last Post: 22 May 2015, 1:08 PM
  2. Replies: 9
    Last Post: 29 Oct 2012, 12:07 PM
  3. JSONP data does not work, static data works
    By hartti in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 11 Aug 2011, 4:49 PM
  4. Grid missing scrollbars with a static data store
    By n4hpg in forum Sencha Ext JS Q&A
    Replies: 20
    Last Post: 7 Jul 2010, 6:59 AM
  5. Tree with static data
    By Stefan B in forum Sencha Ext JS Q&A
    Replies: 4
    Last Post: 21 Jun 2009, 11:06 PM

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
  •