PDA

View Full Version : Problem in Grid Checkbox selection



varunjyoti
21 Jun 2012, 5:09 AM
Ext.define('DG.view.agent.IPRangeGrid', {
extend: 'Ext.grid.Panel',
xtype: 'gridpanel',
multiSelect:true,
selType:'checkboxmodel',
selModel: new Ext.selection.CheckboxModel,
store: 'IPRanges',
columns: [
{
text: "ID",
flex:0.2,
dataIndex: 'id',
sortable: true
},
{
text: "Name",
flex: 1,
dataIndex: 'name',
sortable: true,
}
],

});


I am able to select multiple rows when i click on checkbox, but not able to select multiple rows when i click on the rows itself.

scottmartin
21 Jun 2012, 9:34 AM
Try setting checkOnly: false in your code.
What exact version of extjs are you using?

Scott.

varunjyoti
21 Jun 2012, 7:32 PM
I am using ExtJs 4.0.5 version. I think checkOnly is false by default. So it has no effect.

Here is little more description about the problem

When i click on the row(and not the checkbox), the row is selected. But when i click on another row, the previous one is deselected. But if i click on checkboxes, i am able to select multiple rows. So, the problem is that i am not able to make multiple selections by clicking on the rows. I am just able to make single selection by clicking on the rows.

scottmartin
22 Jun 2012, 6:06 AM
checkOnly is false by default

Correct, but in several cases, the defaults where not correct or not working as expected, so I want to make sure this was not the case.

If you hold down the on the CTRL key, it will multi-select. This is standard behavior.

Scott.