2013-04-18 93 views
1

我是ExtJS中的新成員,現在我正在使用combox列創建可編輯網格。我在顯示從組合框中選擇的數據時遇到問題。願有人幫助我。屏幕截圖如下。在可編輯網格中的ComboxBox

http://dc532.4shared.com/img/KXKZShxg/s7/0.8332573228065803/error2.png?async

Link provided.. :))

我的組合框代碼...

數據:

var farms = new Ext.data.ArrayStore({ 
    fields: ['id', 'farms'], 
    data : [           
      ['1', 'DVZ'], 
      ['2', 'SSK'], 
      ['3', 'LNA'], 
      ['4', 'NSK'] 
      ] 
    }); 

組合框..

header : 'Location', 
      width : 130, 
      fixed : true, 
      hideable : false, 
      dataIndex: 'farms', 
      editor : {xtype:'combo', 
         store: farms, 
          displayField:'farms', 
          valueField: 'id', 
          queryMode: 'local', 
          typeAhead: true, 
          triggerAction: 'all', 
          lazyRender: true, 
          emptyText: 'Select location...', 
          autoload: true 

      } 
+0

向我們展示帶有網格代碼的組合框代碼。 – Ankit 2013-04-18 13:54:26

+0

@Ankit:我已經添加了組合框的代碼.. :))) – Ching29 2013-04-19 01:02:52

回答

1

這可能是在電網配置您的dataindex價值,而不是同樣喜歡你在組合框中配置 值字段例如,看看這個配置上的「負責任的」場

columns: [ 
    { header: 'ID', dataIndex: 'id', width: 50, hidden: true, sortable: true }, 
    {header: 'Responsible', 
      width: 175, 
      sortable: true, 
      renderer: title_respU_D1, 
      dataIndex: 'resp_user_name' 
      ,editor: new Ext.form.ComboBox({ 
        typeAhead: true, 
        triggerAction: 'all', 
        store: app_responsibleStore, 
        mode: 'remote', 
        valueField: 'resp_user_name', 
        displayField: 'resp_user_name', 
        listClass: 'x-combo-list-small' 
     }) 
    } 

] 
+0

感謝您的幫助.. :)) – Ching29 2013-04-19 01:10:35