2012-06-21 71 views
0

我有一個帶有兩個網格面板作爲項目的面板,它是用手風琴佈局設置的。 基於某些條件,我需要顯示或隱藏第二個網格面板。Extjs 4中的手風琴佈局

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

我想基於某些條件顯示或隱藏「chartGridPanel2」。

+0

兩個網格?你確定你不想使用'邊框'嗎? – sha

+0

@sha yes ...我不想使用邊框.. –

回答

0

試試這個:在手風琴

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