PDA

View Full Version : Grid Tool Bar event handler not working.



prasadguduri
7 Aug 2012, 5:00 AM
_getConfig: function () {
return {
region: "center",
height: 600,
id: "grid",
loadMask: true,
tbar: [
header = 'STATE POPULATION ',
{
text: 'Refresh',
style: 'margin-left: 870px',
handler: function () {
// var store = this._createstore();
// store.reload();
// this._createstore.getStore().reload();
//this.showloadMask();
//this.getStore().load()
//this._reload();
// this.grid.GridView().refresh();
// this._reload;

}

}
],
store: this._createstore(),
columns: this._columnModel,
view: new Ext.grid.GridView({})
};
}

- i have created one refresh button on tool bar.
- how can i refresh grid data using that button click?

sword-it
7 Aug 2012, 5:40 AM
Hi prasadguduri,

Are you try load() of store class -


handler:function(){
var store = yourGrid.getStore();
store.load()
}



For more info read API http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Store-method-load