View Full Version : Problem restarting GridPanel's rendering after having stopped it in the beforerender

9 Oct 2009, 2:38 AM
I've a big problem trying to restart the rendering of my GridPanel after having stopped it in my listener which catch the "beforerender" event of it.
I tried many things, like the "render" method called with "this.el.dom.parentNode" or "this.renderTo", and the "applyToMarkup" method, but it do nothing.
The most strange is that when I verify the value of the "this.rendered" boolean variable (which says to the "render" method if the component is rendered, and if it must process the rendering), I get the "true" value, while the component is not rendered (the displaying of it does not lies).

Furthermore, I noted that the processing I do in the "beforerender" listener's handler function is too long for the "render" method because even if I do not return false in this handler function, the rendering is stopped and the component doesn't displays correctly...

Here is the class of my GridPanel:

mmw.EditorGridPanel = Ext.extend(mmw.GridPanel, {
listeners: {
beforerender: function() {
[long process]

Note that if I use a listener added to the class by the "addListener" method, the rendering doesn't stop, even if I return false...

I tried this things to restart the rendering:

this.doLayout(false, true);

Does someone has a solution??


9 Oct 2009, 3:55 AM
I don't think your grid isn't rendered. It just isn't visible!

Is your grid part of a layout?
If yes, is it correctly configured to size the grid?
If not, does the grid have a width and height or is it set to autoHeight:true?

9 Oct 2009, 4:28 AM
Thank you for your reply, but the problem is that the GridPanel is visible, but the columns are not correctly sized (their width is too small), and no data is present in it (I see no lines in the grid).
Furthermore, by observing in firebug, I see that the GridPanel doesn't do the AJAX call which must retrieve the data of the grid.

9 Oct 2009, 4:33 AM
Not enough code.

I suspect it could be a combination of extending to configure and doing unnecessary things in the beforerender handler.

9 Oct 2009, 6:25 AM
I need to close this post because the problem isn't the same now.

I don't find where to do this.