Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha User
[FIXED] Selection Model Binding Problem When Using Multiple Grids
Hi,
There is a selModel binding problem when you have more than one grid in one root component. Problem occurs when first grid has no selModel specified but others has. In design time everthing seems ok. But when previewing rendering process is broken.
In the exported code selModel is defined in the right grid, but selModel is bound to first grid. If you bind a selModel to first grid too, everything works OK.
how to reproduce?
- add a panel,
- set a layout
- add 2 grids, (you can also duplicate the first one)
- set autoRefs
- bind a selModel (checkbox) to second grid
- preview
rendering is broken...
an exported code to show wrong binding:
PHP Code:
MyPanelUi = Ext.extend(Ext.Panel, {
title: 'My Panel',
width: 919,
height: 569,
layout: 'border',
initComponent: function() {
this.items = [
{
xtype: 'grid',
title: 'My Grid',
region: 'center',
ref: 'first',
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'string',
header: 'Column',
sortable: true,
width: 100
}
]
},
{
xtype: 'grid',
title: 'My Grid',
region: 'east',
width: 372,
ref: 'second',
selModel: new Ext.grid.CheckboxSelectionModel({
}),
columns: [
{
xtype: 'gridcolumn',
dataIndex: 'string',
header: 'Column',
sortable: true,
width: 100
}
]
}
];
MyPanelUi.superclass.initComponent.call(this);
this.first.colModel.config.unshift(this.first.selModel);
}
});
as you can see first grid's selModel is being bound to first colModel.
-
Thanks for reporting this!
-
Ext JS Premium Member
Hi!,
Is there a fix for this? I am having similar problem. If you create two grids from same xtype, then use checkboxselection model, it works ok with one grid, but when you switch to the tab that the second grid is in, there are now 2 columns of checkboxes...
-
Sencha User
Solution?

Originally Posted by
scancubus
Hi!,
Is there a fix for this? I am having similar problem. If you create two grids from same xtype, then use checkboxselection model, it works ok with one grid, but when you switch to the tab that the second grid is in, there are now 2 columns of checkboxes...
Hi,
Did you find a solution? I am using ext js 4.0.7 and getting the same error.
Thanks
-
Sencha User
I have same issue with 3 grids in one container
I have three grids in one container , first time when you load the page it shows the data in first grid but to see the data in 2nd and 3rd grid I have to click 2 and 3rd tab then I can see the data, Also I noticed that only two rows get selected .
-
Sencha User
what is FIXED ??
Can anybody show more clear on how to fix ? I am facing this problem too