PDA

View Full Version : view.selModel is undefined with locked column



Oliver Specht
13 Nov 2012, 11:52 AM
Hi,
I am trying to implement a locking column in a grid but get an error in FF:



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:


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

mitchellsimoens
15 Nov 2012, 6:45 AM
I'm not getting that error when I lock a column in the row-editing example.

Oliver Specht
18 Nov 2012, 6:26 AM
Hi, Mitchell,
thanks for testing. I think I will have to check my whole app to find out where the problem is then. Maybe there is some wrong order of initializing the components or so.

Regards,
Oliver