PDA

View Full Version : Locked column grid with row editing plugin ExtJS 4.1.1



jinionnet
13 Jul 2012, 4:29 AM
Hi All,
I had a grid with row editing plugin and it was working perfectly with "edit", "beforeedit" events. Now I want to lock only one column in grid which is not editable. I have set the property "locked":true for that particular column but now both edit/beforeedit not fired when editing anyone of the row. Is this a Extjs specific issue or any other work around for this.

my grid config as follows:


.........................some code here ...........................
selModel: Ext.create('Ext.selection.RowModel', {
mode: 'MULTI'
}),
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {


})
],
columns: [
{
xtype: 'gridcolumn',
minWidth: 100,
dataIndex: 'USER_ID',
flex: 1,
locked: true,
text: 'Username'
},
{
xtype: 'gridcolumn',
hidden: true,
dataIndex: 'ADMIN',
text: 'User Type'
},
{
xtype: 'gridcolumn',
minWidth: 120,
dataIndex: 'LNAME',
flex: 1,
text: 'Last Name',
field: {
xtype: 'textfield',
allowBlank: false,
blankText: 'Please enter a last name'
}
},
.........................some code here ...........................


And my event handler is



Ext.getCmp("mygrid").on("edit",function(){
//This event was fire before
console.info("Editing");
});
Ext.getCmp("mygrid").on("beforeedit",function(){
//This event was fire before
console.info("Before Editing");
});



Please help me to resolve this issue.

Thanks,
Jini

jinionnet
16 Jul 2012, 11:10 PM
Anybody have an idea?

murbo
17 Sep 2012, 2:32 PM
I am seeing this issue with the CellEditing plugin as well. The loss of the 'edit' event is a bit of a showstopper for using locked columns.

jagu102
14 Dec 2012, 7:14 AM
Is this resolved in 4.1.3 or any future version?

zmathew
10 Jan 2013, 7:18 AM
Track the link on EXTJSIV-4875 for tracking resolution. http://www.sencha.com/forum/showthread.php?165284-4.1-beta-Locking-grid-do-not-respond-to-cellclick-event&p=923643#post923643

zmathew
21 Jan 2013, 7:21 AM
Hi,

Here is another identical bug opened as EXTJSIV-8268
http://www.sencha.com/forum/showthread.php?252016-Ext-4.2.0-Beta-Locked-column-grid-and-edit-events

zmathew
1 Mar 2013, 8:38 AM
See http://www.sencha.com/forum/showthread.php?252016-Ext-4.2.0-Beta-Locked-column-grid-and-edit-events/page2 and http://cdn.sencha.com/ext/beta/4.2.0.489/examples/grid/locking-cell-editing-grid.html


(http://cdn.sencha.com/ext/beta/4.2.0.489/examples/grid/locking-cell-editing-grid.html)

jagu102
12 Apr 2013, 3:05 AM
Hi All,
Locked grid with cell editing throws error 'Uncaught TypeError: Cannot call method 'focus' of undefined' in ExtJs 4.2, so i created override for this bug

Ext.override(Ext.grid.locking.View, {
focus: function() {
var p = this.getSelectionModel().getCurrentPosition(),
v = p && p.view ? p.view : this.normalView;


v.focus();
}
});

this works fine for me :). But it was not focusing to the cell which i suppose to edit. see http://docs.sencha.com/ext-js/4-2/extjs-build/examples/grid/locking-row-editing-grid.html
(http://docs.sencha.com/ext-js/4-2/extjs-build/examples/grid/locking-row-editing-grid.html)
Please help.

Thanks in advance,
Jagath