Close and reopen TAB not working!
Hi EXT users
I've made a simple TAB layout, but when I load a grid into one of my tabs, close it and reopen it again. the grid is not loading. Why?
Link to exampel: http://www.multipumpen.mine.nu/mp/er...ut-browser.php
Click at "Vare" in the left side, close the tab and now try to reopen!!
It is working with other types of content!!
Ext JS Premium Member
1. the URL that you posted requires a username and password.
2. Check that you are creating the grid each time you want to show it, if the tap you are closing is being destroyed it will also destroy the grid that it contains.
Sencha - Ext JS Dev Team
Read the docs on Container.remove which is what closing a tab does.
Originally Posted by groyk
Tank you saJoshua for the tip.
Now I understand, all variables for the tab is destroyed too.
Just wondering why some of the content loads without probs!
Anyway. Thank you for your fast reply.
If you destroy a parent container (i.e. a tab), then all child components (grids, attached stores, etc) will also be destroyed. You cannot then show something that no longer exists...
You will need to create new instances of these each time you create a new tab.
Here's an example: