2017-08-01 46 views
2

我正在使用Extjs Grid V6.2可編輯網格中的組合框和組合框箭頭圖標只能在雙擊該域後才顯示。那麼我怎樣才能很容易地將它顯示在最開始, (例如)當網格顯示時。如何在Extjs Grid中始終顯示箭頭圖標?

{ 
          editor: { 
           xtype: 'combobox', 
           queryMode: 'local', 
           displayField: 'name', 
           collapsible: true, 
           valueField:'abbr', 
           store: { 
            Fields: ['abbr', 'name'], 
            data: [{"abbr": "INR", "name": "INR"}, 
             {"abbr": "EUR", "name": "EUR"}, 
             {"abbr": "USD", "name": "USD"}], 
           }, 
          }, 
          dataIndex: 'currency', 
          flex: .5, 
          collapsible: true,       
         }, 

回答

0

代替editor使用widgetcolumn

Ext.application({ 
name: 'Fiddle', 

launch: function() { 

    var grid = Ext.create('Ext.grid.Panel', { 
     renderTo: Ext.getBody(), 
     store: { 
      Fields: ['abbr', 'name'], 
      data: [{"abbr": "INR", "name": "INR"}, 
      {"abbr": "EUR", "name": "EUR"}, 
      {"abbr": "USD", "name": "USD"}], 
     }, 
     columns: [{ 
      dataIndex: 'name', 
      xtype: 'widgetcolumn', 
      widget: { 
       xtype: 'combo', 
       store: ['INR', 'EUR', 'USD'] 
      } 
     }] 
    }); 
    } 
}); 

sencha fiddle

+0

我嘗試這種代碼。此是working.But問題是寬度和寬度懸停大小並不same.And也影響另一個網格列width.How解決這個問題。 – Raguman

+0

@Raguman你可以爲你的問題創建Sencha小提琴嗎? –

0

這裏是我的問題的截圖,它顯示了一個網格寬度的改變。

ScreenShot

相關問題