View Full Version : Nested Card Layouts and TreeGrid

14 Jan 2014, 1:42 PM
Hello all,

I'm writing an application and integrated a TreeGrid to use as a navigation menu, to bring up content in another panel that uses a card layout next to it. One of the options in the list is a folder of reports and I'd like to use another panel with the card layout to select the individual reports. I suppose what I'm really looking for is a way to pass parameters to a card once it's been activated. Any ideas?

14 Jan 2014, 2:10 PM
Are you wanting access items on the active page?

name: 'Fiddle',

launch: function() {

var active = 0;
var main = Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
width: 300,
height: 200,
layout: 'card',
items: [{
title: 'P1'
}, {
title: 'P2',
items: [{
xtype: 'textfield',
fieldLabel: 'Text',
itemId: 'text-field-id'
}, {
title: 'P3',
listeners: {
beforeactivate: function() {
return false;

var layout = main.getLayout();

var card = layout.getActiveItem();
card.down('textfield').setValue('Text sent here!');


15 Jan 2014, 5:19 AM
The active item will vary based on what's clicked in the nav menu. So I have the tree grid, and I want to click an option, and have it open a card in the main content panel, and that new card opens a card inside itself depending on which option was clicked in the nav panel.