PDA

View Full Version : Rendering and disappearing grids



deitch
26 Nov 2007, 3:35 PM
In line with the thread
http://extjs.com/forum/showthread.php?t=14288
about rendering dynamically to a panel in a borderlayout, I have a center region with a blank "holder" panel. I then hold a reference to the holder panel, and easily add to / remove from that panel. Here is where it gets strange.

I initially start with a content panel inside the holder with a simple "Select an item to start" type message. When someone selects in the west panel, I remove all children of the holder and add a tabpanel with some grids, one on each tab. It works perfectly.

Now I remove the tabpanel from the holder, do some other stuff, and add it back. Now, the grids do not render. Using firebug I can see that the grid objects exist as children of the tabpanel tabs, that each one has data, but neither the header nor the grid itself is renderer. I inspected the HTML itself, and, of course, nothing is rendered within the x-grid3 div.

Anyone seen this?
Avi

deitch
26 Nov 2007, 3:39 PM
By the way, I did manage to work around this by adding the panel only once, then rather than adding/removing from the holder, I set visible/hidden. I still do not know why the problem exists, though.