PDA

View Full Version : Sort grid by group sum



rans
17 Feb 2013, 11:56 PM
Hi,

I can't find an option to sort my grid by the group summaryRenderer, how can I do it?41909


var leaderboardGrid = Ext.create('Ext.ux.LiveSearchGridPanel', {
store: 'leaderboardStore',
columnLines: true,
id: 'leaderboardView',
collapsible: false,

columns: [
{
text : 'User Name',
flex : 2,
sortable : true,
dataIndex: 'userId',


}, {
text : 'Round',
width: 90,
sortable : true,
dataIndex: 'cycle',

},{
text : 'Points',
flex : 1,
sortable : true,
dataIndex: 'point',
summaryType: 'sum',
summaryRenderer: function(value, summaryData, dataIndex) {
return value + ' points';
},
},
],
features: [{
id: 'group',
ftype: 'groupingsummary',

groupHeaderTpl: '{name}',

hideGroupedHeader: true,

}],

height: 350,
width: 600,
title: 'Leaderboard',

viewConfig: {
stripeRows: true
},


});


thanks,
Rans

mitchellsimoens
19 Feb 2013, 1:42 PM
You are going to have to specify your own sorter to sort with your complex criteria. You could also return the group data in the records and sort by that field