Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-4258 in a recent build.
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Location
    Canada
    Posts
    8
    Vote Rating
    0
    smatric is on a distinguished road

      0  

    Default Ext.grid.plugin.CellEditing + Ext.selection.CheckboxModel = TypeError

    Ext.grid.plugin.CellEditing + Ext.selection.CheckboxModel = TypeError


    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.0.2a rev June 9, 2011

    Browser versions tested against:
    • Google Chrome 12.0.742.112
    • FF4 (Firebug 1.7.3 installed)

    Description:
    • Cell editing plugin and checkbox extension are not compatible. If used together on a grid (Ext.grid.Panel) an error is being thrown when checkboxes in the grid are clicked.

    Steps to reproduce the problem:
    • Run the code below
    • Click on a checkbox on the left next to any row (but not the "select all" checkbox---that one is working fine).

    The result that was expected:
    • The row should be selected without any errors in the debug console

    The result that occurs instead:
    • The row is properly selected but Google Chrome shows the following error:
      Uncaught TypeError: Object [object Object] has no method 'getEditor'
      Ext.define.getEditorCell Editing.js:297
      Ext.define.startEditCell Editing.js:218
      Ext.define.startEditByClick Editing.js:257
      fire ext-debug.js:16353
      Ext.define.fireEvent Observable.js:287
      Ext.define.processItemEvent Table.js:689
      Ext.define.processUIEvent View.js:467
      Ext.define.handleEvent View.js:406
      anonymous:5 ext-debug.js:16900

      Firefox displays:
      Error: column.getEditor is not a function
      Source File: ext4/ext-debug.js Line: 7725

    Test Case:

    Code:
    Ext.onReady(function() {
    Ext.create('Ext.grid.Panel', {
        title: 'Example',
        store: Ext.create('Ext.data.Store', {
            fields:['name', 'email'],
            data:{'items':[
                {"name":"Tom", "email":"tom@example.com"},
                {"name":"John", "email":"john@example.com"},
                {"name":"Kerri", "email":"kerri@example.com"}
            ]},
            proxy: {
                type: 'memory',
                reader: { type: 'json', root: 'items' }
            }
        }),
        columns: [
            {header: 'Name',  dataIndex: 'name', field: 'textfield'},
            {header: 'Email', dataIndex: 'email', field: 'textfield', flex:1}
        ],
        selModel: Ext.create('Ext.selection.CheckboxModel'),
        plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ],
        renderTo: Ext.getBody()
    });
    });


    HELPFUL INFORMATION


    Screenshot or Video:
    • attached

    Operating System:
    • Ubuntu 11.04
    Attached Images

  2. #2
    Sencha User Nom4d3's Avatar
    Join Date
    Sep 2008
    Location
    Araras / SP / Brazil
    Posts
    81
    Vote Rating
    1
    Nom4d3 is on a distinguished road

      0  

    Default


    UP!

    I have the same issue here. Any way to fix it?

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    12
    Vote Rating
    0
    Qanik is on a distinguished road

      0  

    Default


    +1
    same here

    temporary fix (only smoke tested):
    Code:
    Ext.override(Ext.grid.plugin.CellEditing, {
            startEdit: function(record, columnHeader) {
                if (columnHeader && columnHeader.isCheckerHd) {
                    return false;
                }
                return this.callOverridden(arguments);
            }
        });

  4. #4
    Sencha Premium Member
    Join Date
    Mar 2011
    Posts
    41
    Vote Rating
    0
    annette is on a distinguished road

      0  

    Default I experience the same problem

    I experience the same problem


    I solve the problem by running the following function when the "beforeedit" event occurs:
    Code:
    onBeforeEditCell : function(event) {        
        if (event.column && event.column.isCheckerHd) {
            return false;
        } 
                
        return true;
    }
    False is returned to stop the editing.

  5. #5
    Sencha User
    Join Date
    Jun 2010
    Posts
    6
    Vote Rating
    0
    info2004 is on a distinguished road

      0  

    Default


    +1