View Full Version : gridSummary

5 Aug 2012, 5:16 AM
I have attached 1 screen shot. please go through that and give suggestion. I have taken local store
for data.So data side no issue.For testing i have taken some garbage data.
i have pasted my code also.

var summaryGrid = Ext.create('Ext.grid.Panel', {
height: 440,
width: 390,
store: store,
features: [{
ftype: 'groupingsummary',
groupHeaderTpl: '{name}'
columns: [{
// text: 'Task',
flex: 1,
// sortable: true,
dataIndex: 'program',
hideable: false



then one additional doubt how i can take that collapsible icon to right?

thanks ,

6 Aug 2012, 8:53 AM
Have you looked at the docs for groupingsummary (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.grid.feature.GroupingSummary)?

Take a look at groupHeaderTpl (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.grid.feature.Grouping-cfg-groupHeaderTpl), startCollapsed (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.grid.feature.Grouping-cfg-startCollapsed), and showSummaryRow (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.grid.feature.AbstractSummary-cfg-showSummaryRow).

Are you wanting to total something? Your data doesn't suggest that... If not, use a grouping feature.

6 Aug 2012, 8:30 PM
No there is nothing to total. see the screen shots.i just want to collapsible data and on click of groupHeader a panel should appear with some data and on click of items under that groupHeader a different panel should come with some other data.

so please suggest how to achieve that.

7 Aug 2012, 7:27 AM
It seems you want a grouping grid (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.grid.feature.Grouping). Here is an example (http://docs.sencha.com/ext-js/4-1/#%21/example/grid/groupgrid.html), and another (http://try.sencha.com/extjs/4.1.1/docs/Ext.grid.feature.Grouping.1/) one that you can edit.

Look at the groupclick event, and the cellclick on the grid.