Reputation: 33
This could be a stupid question, but I cant figure out how to access store in gridpanel
var grid = new Ext.grid.GridPanel({
.....
store: store,
......
listeners: {
'beforerender' : function(grid) {
//grid.getStore();
}
}
I want to loop through the store , but grid.getStore() returns empty object.
Upvotes: 0
Views: 6668
Reputation: 11486
you can simply do grid.store
.
If you know it will be filled with data before the grid renders (you seem to be calling this from the grid beforerender
event) you can do grid.store.getRange()
to get the records that you want to loop through, as you mentioned in your question.
Upvotes: 1