1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    146
    Vote Rating
    0
    Answers
    19
    coletek is on a distinguished road

      0  

    Default Answered: How do I dynamically add data to a store?

    Answered: How do I dynamically add data to a store?


    If I have a Ext.Ajax.request() call to get some data (instead of a proxy). How do I add it to a store?

    I thought I could do this:
    Code:
        store = Ext.getCmp('complist').getStore();
    
            store.add({
                id: '1',
                name: 'something',
                game_type: '1',
                is_private: '0'
            });
            store.sync();
    But it doesn't work.
    What comes around goes around

  2. store.add(modelConfig/modelsConfig) should works. Is your store bounded to a certain model type??

    Try store.setData(config);

  3. #2
    Sencha User Diego Garcia's Avatar
    Join Date
    Jan 2012
    Location
    San José, Costa Rica.
    Posts
    85
    Vote Rating
    7
    Answers
    13
    Diego Garcia is on a distinguished road

      0  

    Default


    store.add(modelConfig/modelsConfig) should works. Is your store bounded to a certain model type??

    Try store.setData(config);

Thread Participants: 1