PDA

View Full Version : adding a custom eventlistener [newbie]



nbize
25 Jan 2008, 3:11 AM
Hi community,

I'm having a small issue. On my main form I have 2 buttons, but1 and but2. but1 creates new Ext.Windows, each containing a GridPanel. is there a way to refresh all of those newly gridpanels by pushing but2?

Thanks

Condor
25 Jan 2008, 3:13 AM
You'll need to reload all the stores of the displayed grids.

If you give your store an id you can get a reference to it by using:


var store = Ext.StoreMgr.get('id-of-store');

nbize
25 Jan 2008, 3:39 AM
Thanks for the quick reply! Is there a way to not have to give the stores different IDs though? Using your method, only the last created panel gets the id and gets refreshed when but2 is clicked. My goal would be for the user to be able to open up as many gridpanels as he wants, closing them and re-opening them, but reloading them in one single shot by clicking but1...

Condor
25 Jan 2008, 3:45 AM
You'll have to keep track of the the active stores yourself then and reload them all when requested.