Results 1 to 2 of 2

Thread: CellEditing Plugin Bug - Reconfigured Editorgrid with Grouped Headers

  1. #1
    Sencha User
    Join Date
    Apr 2007
    Posts
    39

    Default CellEditing Plugin Bug - Reconfigured Editorgrid with Grouped Headers

    ExtJs 4.1.1

    I posted this earlier but somehow don't see the thread. In case of duplication, please delete.

    I have a EditorGrid which is created with reconfigure. The editorgrid consists of grouped headers. When I try to double-click on a cell to edit, I get an error - columnHeader.getEditor is not a function.

    This error is generated from within the 'startEdit' function inside 'Ext.grid.plugin.CellEditing' plugin.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
    <head>
    <title>Test Locked EditorGrid</title>
    <meta http-equiv="Content-Type"       content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language"   content="de" />
    
    <link rel="stylesheet" href="../../resources/css/ext-all.css" />
    <script type="text/javascript" src="../../ext-all-debug.js"></script>
    <script type="text/javascript">
      Ext.onReady(function() {
        var lockedPanel =  Ext.create('Ext.grid.Panel', {
          title: 'Locked Grid with reconfigure',
           
          autoScroll: true,
          
          renderTo: Ext.getBody(),
          
          enableLocking: true,
          
          columns: [],
          
          updateGrid: function(definition) {
            var me = this;
    
            var store = Ext.create('Ext.data.Store', {
              fields: definition.get('fields')
            });
            store.loadData(definition.get('data'));
            me.reconfigure(store, definition.get('columns'));
          },
          
          columnLines: true,
          plugins: [
            {
              ptype: 'cellediting'
            }
          ]
        });
    
        var dynamicDefinitionStore = Ext.create('Ext.data.Store', {
          fields: [
            'fields',
            'data',
            'columns'
          ],
          data: {
             fields: [
              'group',
              'type',
              'value'
            ],
            columns: [
              {
                header: 'Main Group',
                locked: true,
                columns: [
                  {
                    header: 'Group',
                    locked: true,
                    dataIndex: 'group',
                    editor  : {
                      xtype  : 'textfield'
                    }
                  }
                ]
              },
              {
                header: 'Second Group',
                columns: [
                  {
                    header: 'Type',
                    dataIndex: 'type',
                    editor  : {
                      xtype  : 'textfield'
                    }
                  },
                  {
                    header: 'Value',
                    dataIndex: 'value',
                    editor  : {
                      xtype  : 'textfield'
                    }
                  }
                ]
              }
            ],
            data: [
              ['Group1', 'Type1', 'Value1'],
              ['Group1', 'Type2', 'Value2'],
              ['Group1', 'Type3', 'Value3']
            ]
          },
          listeners: {
            load: {
              fn: function(store, records, success) {
                //console.log('records', records);
                lockedPanel.updateGrid(records[0]);
              }
            }
          }
        });
      });
    </script>
    </head>
    <body></body>
    </html>

  2. #2
    Sencha - Support Team
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •