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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,753
    Vote Rating
    1304
      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
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    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
  •