View Full Version : Grouping Problem

28 Sep 2011, 12:52 AM
I am using the extjs desktop, and modified the tab window that came with it so it contains two tabs. Each tab contains a grid. In one of my grids (the Summary Report tab) I am trying to use the grouping feature. I cannot get this to work, what happens is when I add this code:

var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{
groupHeaderTpl: 'Category: {name}'

the tab window will not open. The tab window works perfectly without that code. I am not sure if I am missing something, or if 'autoload' might be a problem. Below is the code I am using. I tried to make the grouping code that I added bold, but it was not showing up. So instead, I added "*****" before the code I added for grouping.

Thank you for your help

28 Sep 2011, 2:57 AM
What errors do you get in the console?

Try adding some logging in your code to figure out which line breaks it.

Try removing the line where you include the features in the grid: leave everything else exactly as it is. Does it work without that line?

Can you check that the Grouping feature is actually being loaded? If you aren't using the dynamic loader then this shouldn't be an issue.

28 Sep 2011, 4:21 AM
Your stores have no groupField, see the shipped Grouing example in the SDK for guidance:

var Restaurants = Ext.create('Ext.data.Store', {
storeId: 'restaraunts',
model: 'Restaurant',
sorters: ['cuisine','name'],
groupField: 'cuisine',
data: [{