-
17 Feb 2013 11:56 PM #1
Sort grid by group sum
Sort grid by group sum
Hi,
I can't find an option to sort my grid by the group summaryRenderer, how can I do it?sort group.png
thanks,Code: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 }, });
Rans
-
19 Feb 2013 1:42 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 434
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
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote