Threaded View

  1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    25
    Vote Rating
    0
    Oliver Specht is on a distinguished road

      0  

    Default Answered: view.selModel is undefined with locked column

    Answered: view.selModel is undefined with locked column


    Hi,
    I am trying to implement a locking column in a grid but get an error in FF:

    Code:
    TypeError: view.selModel is undefined
    When debugging, I can see that the error comes up in Ext.grid.plugin.Editing and view does contain two more views with selection models set: normalView and lockedView.

    I tried the examples and they work fine, so I wonder where this comes from. I simply set the first column to locked:true and the others to locked:false

    The grid looks like this:

    Code:
    Ext.define('My.grid.Panel', {
        extend : 'Ext.grid.Panel',
        alias : 'my.grid.panel',
        autoHeight : true,
        selModel : Ext.create('Ext.selection.RowModel', {
            singleSelect : true
        }),
        resizable : false,
        frame : false,
        plugins : [ {
            ptype : 'rowediting',
            clicksToEdit : 2,
            pluginId : 'rowediting',
            listeners : {
                canceledit : function(editor, e, eOpts) {
                    e.grid.store.removeAt(0);
                }
            }
        } ],
        tbar : [ {
            text : 'Add'
        } ],
        listeners : {
            activate : function(grid) {
                grid.store.load();
            }
        },
        viewConfig : {
            stripeRows : true
        }
    });
    Can anyone give me a hint what I am doing wrong?

    I am working with ExtJS 4.1.1a, so maybe it is just a version too early?

    Thank you,
    Oliver

  2. I'm not getting that error when I lock a column in the row-editing example.

Thread Participants: 1