Search code examples
javascriptjspextjs4java-ee-6

ComboxBox in an editable Grid


I am new in ExtJS and now I am making an editable grid with a combox column. I am having a problem in displaying my chosen data from the combobox. May someone help me. Screenshot is provided below.

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

Link provided.. :))

My combobox code...

Data:

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

Combobox..

 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

          }

Solution

  • You may be missing some "config" in editor config of items in grid panel.

    I hope you may missed typeAhead config.

    Please refer below link of sencha example

    http://docs.sencha.com/extjs/4.0.7/extjs-build/examples/grid/cell-editing.html

    Thanks.