Results 1 to 2 of 2

Thread: Grid CellEditing plugin bug

    Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    12
    Vote Rating
    0
      0  

    Default Grid CellEditing plugin bug

    REQUIRED INFORMATION



    Ext version tested:
    • Ext 4.1.1a
    Browser versions tested against:
    • Chrome 22
    Description:

    I am using ExtJS 4.1.1a version. I have a Grid with a CellEditing plugin and TreePanel.

    Steps to reproduce the problem:

    * Start cell editing in gridpanel
    * Before cell editing complete, select node on TreePanel.

    Test case:

    Code:
    // JavaScript Document
    Ext.define('Payroll.view.attendance.BugTest', {
        extend: 'Ext.window.Window',
        initComponent: function(){
            var me = this;
            me.onSelectTree = function(){
                me.down('panel[name=panelMain]').removeAll();
            }
            Ext.apply(me, {
                width: 500,
                height: 400,
                layout: 'border',
                items: [
                    Ext.create('Ext.tree.Panel', {
                        region: 'west',
                        name: '',
                        rootVisible: true,
                        store: Ext.create('Ext.data.TreeStore', {
                            autoLoad: false,
                            fields: ['id', 'text'],
                            root: {
                                text: 'Root',
                                id: '0',
                                children: [
                                    { text: 'Child 1', id: 1 }, 
                                    { text: 'Child 2', id: 2 }
                                ]
                            }
                        }),
                        width: 210,
                        split: true,
                        listeners: {
                            selectionchange: function(tree, record, opts){
                                if (record.length > 0){
                                    me.onSelectTree();
                                }
                            }
                        }
                    }),
                    {
                        xtype: 'panel',
                        name: 'panelMain',
                        region: 'center',
                        layout: 'fit',
                        items: [
                            {
                                xtype: 'grid',
                                plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ],
                                store: Ext.create('Ext.data.Store', {
                                    fields: ['age', 'name'],
                                    data: [{age: 5, name: 'Joshua'}, {age: 5, name: 'Ben'}]
                                }),
                                columns: [
                                    {
                                        dataIndex: 'age',
                                        header: 'Age',
                                        editor: 'numberfield'
                                    },
                                    {
                                        dataIndex: 'name',
                                        header: 'Name',
                                        editor: 'textfield'
                                    }
                                ]
                            }
                        ]
                    }
                ],
                buttons: [
                    {
                        text: 'Remove All', 
                        handler: function(){
                            me.down('panel[name=panelMain]').removeAll();
                        }
                    }
                ]
            });
            me.callParent();
        }
    })
    Possible Fix:
    Code:
            me.onSelectTree = function(){
    		var g = me.down('gridpanel');
    		if (g){
    			var p = me.down('gridpanel').editingPlugin;
    			if (p){
    				p.cancelEdit();
    			}
    		}
    
    
                me.down('panel[name=panelMain]').removeAll();
            }

    Uncaught TypeError: Cannot read property 'processEvent' of undefined ext-all-debug.js:95208
    Ext.define.processEvent ext-all-debug.js:95208
    fire ext-all-debug.js:8896
    Ext.define.continueFireEvent ext-all-debug.js:9102
    Ext.define.fireEvent ext-all-debug.js:9080
    Ext.override.fireEvent ext-all-debug.js:51104
    Ext.define.processItemEvent ext-all-debug.js:92629
    Ext.define.processUIEvent ext-all-debug.js:85298
    Ext.define.handleEvent ext-all-debug.js:85227
    (anonymous function)
    wrap

    How can I solve this problem??

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,336
    Vote Rating
    1297
      0  

    Default

    I moved this to the bugs forum, you had this in the Q&A forum.

    With your test case I cannot reproduce this in 4.1.3
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

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