Grouping on multiple columns in extjs 4


Yes, you can still add multiple columns to a grouping grid, and it’s not that hard, you just have to look in the store!

To add a second or even third column to an extjs grid all you now have to is add the extra columns in the store’s getGroupString property. The code below illustrates the addition of a second value when the group string equals some_property.

var some_data_store = Ext.create('', {
    getGroupString: function(instance) {
	   var group = this.groupers.first();
  	   if (group) {
       	      if ( == 'some_property') {
		 return instance.get( + ' (' + instance.get('my_second_property') + ') ';
	  return instance.get(;
		   return '';
	proxy: {
        	type: 'ajax',
        	url : 'some_url.php',
        	reader: {
            	type: 'json',
            	root: 'data'

5 thoughts on “Grouping on multiple columns in extjs 4”

Leave a Reply