PDA

View Full Version : Get to GridPanel on load event of store



vishalg
25 Jan 2008, 1:37 PM
I need to access the GridPanel when the data store is reloaded. What is the best way to get to the GridPanel when the load event is triggered? I could not find any reference in the docs that gave you access to the GridPanel through a property or a method. Thanks in advance

25 Jan 2008, 2:38 PM
I need to access the GridPanel when the data store is reloaded. What is the best way to get to the GridPanel when the load event is triggered? I could not find any reference in the docs that gave you access to the GridPanel through a property or a method. Thanks in advance

try using the store.on('load', function() {...}); event.

Condor
26 Jan 2008, 12:57 AM
The easiest way it to set a scope, e.g.


grid.store.on('load', function(store, records, options) {
// Use this (= grid)
}, grid);

or you could use a delegate:


grid.store.on('load', (function(store, records, options, grid) {
// use grid parameter
}).createDelegate(null, [grid], true));