PDA

View Full Version : Reload SimpleStore



andrewjbaker
13 Feb 2008, 7:59 AM
Hi all,

I'm attempting to reload a SimpleStore that is bound to an EditorGrid. The SimpleStore is declared as follows...



var sAbsenceCategories = new Ext.data.Store({
fields: ['Key', 'Value'],
proxy: new Ext.data.HttpProxy({
method: 'GET',
url: 'Bsl/GetAllValues.ashx?methodName=Execute&args=AbsenceCategories'
}),
reader: new Ext.data.JsonReader({
fields: [
{ name: 'Key', mapping: 'Key' },
{ name: 'Value', mapping: 'Value' }
],
id: 'Key',
root: 'AbsenceCategories'
}),
remoteSort: false
});


It is then bound to an EditorGrid named egAbsence.

The call to the reload() method I'm employing is simply...



// ...
new Ext.Toolbar.Button({
cls: 'x-btn-text',
handler: function() {
egAbsence.getDataSource().reload();
},
text: 'Refresh'
}),
// ...


Monitoring execution in Firebug, the Ajax request doesn't trigger when the reload() method is called.

fay
13 Feb 2008, 8:40 AM
See: http://extjs.com/forum/showthread.php?p=123351#post123351

andrewjbaker
14 Feb 2008, 6:16 AM
Cheers fay, I'd already skimmed the post you referred to. And, like the original poster, I've opted to reload the data store by recreating the store.