View Full Version : changing from GridPanel to DataView in a tab

20 Feb 2008, 10:49 PM
i currently have a tab that is configured as a GridPanel
wondering if the contents of the tab can be changed to that of a DataView

currently this is a snippet of what i have done to add the grid as a tab

var grid = new Ext.grid.GridPanel({
store: store,
cm: cm,
stripeRows: true,
view: view,
id: 'grid' node.id,
title: 'Directory',
border: false,

id: 'dataTab',
title: tabTitle,
closable: true,
autoScroll: true,
items: [grid]

this is the new DataView that i wish to reload in the same tab

var tpl = new Ext.XTemplate(

20 Feb 2008, 11:21 PM
Add a layout:'card' to your dataTab. Then you can use:

var dataTab = Ext.getCmp('dataTab');

ps. Even if you don't use this, your dataTab still needs a layout ('fit' in this case).