ExtJs - Destroy and render component
I'm trying to destroy and render a grid and doesn't work...
var gridCategory = new Ext.grid.GridPanel(...);
I just fire a button called 'Render grid'...
gridCategory.render('gridArea');
and gridCategory.rendered becomes True
so I have a button called 'Destroy grid'
gridCategory.destroy();
and gridCategory.rendered keeps True
and I tried to render again
gridCategory.render开发者_开发百科('gridArea');
and it fail, doesn't render
what am I doin' wrong? please help
Once you call destroy on an Ext Component, it cannot be rendered again. All resources (ideally) are released when you call destroy. To display it again, you will need to create a new instance of your grid.
精彩评论