View Full Version : final resize event in gridpanel

9 Aug 2010, 8:38 AM
Is it possible to detect the final resize event on initial gridpanel rendering?
I am doing jsonstore data loads on the resize events.
But on initial rendering the resize event is called multiple times and I want to call the load on the final resize event.
Cannot put it in render event because I need it to be in the resize event (when user resizes the grid and I want to repopulate the grid). Just on the initial load I would like to avoid multiple data loads.

9 Aug 2010, 11:50 AM
Why not use the 'afterrender' event for the initial loading, and in that function handler attach a listener for any future resize events?

9 Aug 2010, 12:56 PM
I tried it, but the afterrender event gets fired before the resize events...
There are total of three attempts to load data. afterrender, resize, resize...
Perhpas it is the way I am doing resizing... but the grid of interest in contained within other panels within a viewport...

9 Aug 2010, 1:17 PM
Add the listener in the afterlayout event of the grid's Contaier.