Results 1 to 3 of 3

Thread: Can EditorGrid and CheckBoxModel work together?

  1. #1

    Default Can EditorGrid and CheckBoxModel work together?

    I found out that if I mix CheckboxModel and EditorGrid together, it will produce the following errors

    Code:
    ext-all-debug.js (Line 83219)
    
    columnHeader.getEditor is not a function
        if (columnHeader && !columnHeader.getEditor(record)) {
    The following is an example
    Code:
    Ext.define('MyGridPanel', {
        extend: 'Ext.grid.Panel',
        alias: 'widget.myGridPanel',
        title: 'Air',
        store:  new Ext.data.Store({
                    fields: ['productId', 'name', 'amount'],
                    proxy: {
                        type: 'memory',
                        reader: {
                            type: 'json',
                            root: 'data'
                        }
                    }
                }),
        columns: [
            { header: 'productId', dataIndex: 'productId', hidden: true},
            { header: 'name', dataIndex: 'name', flex: 1 },        
            {
                header: 'Amount',
                dataIndex: 'amount',
                editor: {
                    xtype: 'numberfield',
                    allowNegative: false,
                    minValue: 0.00
                },
                renderer: function(value, metaData, record, rowIndex, colIndex, store, view){
                    return Ext.util.Format.number(value, "0.00");
                }
            }
        ],
        selModel: new Ext.selection.CheckboxModel({
            mode: 'MULTI'
        })
        ,selType: 'checkboxmodel'
        ,multiSelect: true
        ,plugins: []
        ,constructor: function(config) {
            this.plugins[0] = new Ext.create('Ext.grid.plugin.CellEditing', {
                clicksToEdit: 1
            });
            this.callParent(arguments);
        }
    });

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    There is a bug reported about using these two together.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3

    Default

    oops. I am using 4.0.7. Will this be fixed in 4.0.8?

Posting Permissions

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