1
votes

I have a grid initially loaded with some data from the Store. I have search field in the form through which I can filter data. After the entering search criteria in the search field... I am calling an ajax request and getting data into the app, but unable to load this data into the store and update the grid.

var myStore = Ext.data.StoreManager.get("driveScheduleStore");
var tempStore = Ext.data.StoreManager.get("tempDSStore");

var strSearch = Ext.getCmp('VoiceDIDSearch').getValue();

Ext.Ajax.request({
    url: '.../TEST/GetDriveScheduleDataFilter.php',    
    method: 'POST',
    params: { 
        VDID:strSearch
    },
    success: function(result, request) {
        var json = result.responseText;
        var temp = JSON.parse(json);

        myStore.load(temp.SCHEDULE);
        Ext.Msg.alert('Message',myStore.getTotalCount());

    },
    failure: function(result, request) {
        Ext.Msg.alert('Error', 'An Error occured...');
    } 
});

Please help.

Thanks in advance.

2

2 Answers

1
votes

You can try with store.loadRawData(data, [append]).

0
votes

The load function loads the store using the configured proxy, you need to use loadData to load custom json data.

http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.data.Store-method-loadData