PDA

View Full Version : [CLOSED] CellModel setCurrentPosition doesn't work properly when the grid has locked columns



bogc
29 Oct 2013, 3:00 PM
I tested this in 4.1.1, 4.2.1 and 4.2.2, IE 9, Chrome (30.0.1599.101 m), FF (24)

To reproduce the issue, and for your convenience I attached two zip files:
- TestLockedGrids.zip - contains the SA project
- TestLockedGridsPublish.zip - contains the published folder using ExtJs 4.2.1 (note that I tested this in 4.2.2.1144, however the published version points to 4.2.1.

To reproduce this issue:
- Unzip the published archive in a directory and open the root app.html page via a web server of your choice in one of the three browsers.
- The page shows a grid panel with a locked column. The grid panel has a top toolbar with a button labelled 'Select Cell'. The grid panel selection model is set to CellModel.
- Click the Select Cell button. The click handler executes the following code:

debugger;
this.getMyGridPanel().selModel.setCurrentPosition({row:3, column:0});


Expected behavior:
-the cell that contains the string 4/1 should be selected
Actual behavior:
-the cell that contains the string 4/2 is selected

Could you please fix this? And are there any workarounds for version 4.1.1? I am still using Ext.Net 2.1 which uses Ext Js 4.1.1.

Thanks

Edit: Stripped down test case.



Ext.require('*');

Ext.define('MyModel', {
extend: 'Ext.data.Model',
fields: ['f1', 'f2', 'f3']
});

Ext.onReady(function() {

var sm = new Ext.selection.CellModel();
new Ext.container.Viewport({
layout: 'fit',
items: [{
xtype: 'gridpanel',
id: 'myGridPanel',
store: {
model: MyModel,
data: [{
f1: '1/1',
f2: '1/2',
f3: '1/3'
}, {
f1: '2/1',
f2: '2/2',
f3: '2/3'
}, {
f1: '3/1',
f2: '3/2',
f3: '3/3'
}, {
f1: '4/1',
f2: '4/2',
f3: '4/3'
}]
},
columns: [{
dataIndex: 'f1',
locked: true,
text: 'f1'
}, {
dataIndex: 'f2',
text: 'f2'
}, {
dataIndex: 'f3',
text: 'f3'
}],
tbar: [{
text: 'Select Cell',
handler: function() {
sm.setCurrentPosition({
row:3,
column:0
});
}
}],
selModel: sm
}]
});

});

Gary Schlosberg
29 Oct 2013, 3:45 PM
Thanks for the report! We have opened a bug in our bug tracker.

shaleth
9 Jan 2014, 9:30 AM
Has anybody found a workaround for this issue?