Results 1 to 2 of 2

Thread: Sort grid by group sum

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    13
    Vote Rating
    0
      0  

    Default 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

    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
    			},
    
    
    		});
    thanks,
    Rans

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,029
    Vote Rating
    1367
      0  

    Default

    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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •