View Full Version : toggle between dataview and grid

9 Apr 2010, 6:17 AM

With a button I want to switch between a Dataview(Panel with XTemplate) and a GridPanel.
They both use the same JsonStore.
the Dataview is in the center region, the button in the north.

What's the best method to do this?
removeAll() on the Dataview and render() a new GridPanel?

9 Apr 2010, 8:20 AM
Use a CardLayout (http://www.extjs.com/deploy/dev/docs/?class=Ext.layout.CardLayout) and switch between the two as needed.