PDA

View Full Version : get selected row from grouped grid.



chinnib37
11 Dec 2013, 10:58 PM
Hi,
I am using grouped grid in my application.
I want get selected row from grid. If all groups are expanded then its working fine. But if I collapsed all groups and extends only last one or any other group except first one,then I am unable to get row index or record.
Its showing row index as -1.
How to fix this issue.

my sample code:
initComponent : function(){
var _this = this;
var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
groupHeaderTpl: '{name}',
ftype: 'grouping',
listeners : {
groupexpand : function(view, node, group, e, eOpts){
_this.getController().fetchActivities(view, node, group);
}
}
});
_this.features = [groupingFeature];
_this.store = _this.getWeekStore();
_this.columns = [{
header : 'ClocKIn',
dataIndex : 'clockInTime',
flex : 1
},{
header : 'ClockOut',
dataIndex : 'clockOutTime',
flex : 1
},{
header : 'Break',
flex : 1.5,
itemId:'Breaks',
renderer : function (object,metaData, record) {
if(record.data.clockOutTime){
return '<a href="#">Break</a>';
}
},
listeners : {
click : function(view, colIndex, rowIndex){
console.dir(rowIndex);
console.dir(colIndex);
_this.getController().showBreaks(view, colIndex, rowIndex);
}
}
}]
}

Thanks.

scottmartin
18 Dec 2013, 2:45 PM
What version of Ext4 are you using? This was a known issue is early version. Please try the latest version.