Extjs 4中的手风琴布局

时间:2012-06-21 09:56:14

标签: extjs4

我有一个面板,有两个网格面板作为项目,使用手风琴布局设置。 基于某些条件,我需要显示或隐藏第二个网格面板。

var chartStoreGridPanel = Ext.create('Ext.Panel', {
               id: 'chartStoreGridPanel',
               height: 200,
               layout: 'accordion',
               items: [chartStoreGridPanel1, chartStoreGridPanel2]
            });

我想根据某些条件显示或隐藏“chartGridPanel2”。

1 个答案:

答案 0 :(得分:0)

试试这个:

    items: [
        chartStoreGridPanel1,
        <condition> ? chartStoreGridPanel2 : {}
    ]