I have a store:
var store = new Ext.data.store({ autoLoad: true, autoSync: true, model: 'myModel', proxy: { type: 'rest', url: '/url/to/my/json/encoded/results', reader: { type: 'json', root: 'results' }, writer: { type:'json' } } });
What is the repository for some grid in which I show these results. My grid is configured as follows:
var myGrid = new Ext.grid.Panel({ id:'myGridID', layout:'anchor', border:false, title:'My Grid', width:412, store:store, heigth:300, frame:false, .... etc
At some point, I add a record to my database, which works fine (if I reload the page, I see a new record added in my grid). What I want to do is reload the grid, so when I save this record in my database, the repository and grid are updated and show the newly added record, without having to reload the whole page.
I tried:
Ext.getCmp('myGridID').getStore().reload();
and...
Ext.getCmp('myGridID').getStore().load();
and...
Ext.getCmp('myGridID').getView().refresh();
and I also tried setting up the repository as Ext.data.JsonStore, but it does nothing.
But nothing works, I searched all over the Internet for this to no avail.
Any help is appreciated.