-
1 Jun 2011 2:16 AM #1
Ext.grid.feature.Summary && Ext.grid.feature.Grouping
Ext.grid.feature.Summary && Ext.grid.feature.Grouping
can someone show me the correct direction to look into.
I have both of these features on the grid and the Summary shows in every grouping but I only want it to show at the bottom for all of the groupings.
-
3 Jun 2011 7:25 AM #2
-
27 Jun 2011 3:42 AM #3
i don't understand the problem. explain better

-
27 Jun 2011 10:40 PM #4
I want to have the Ext.grid.feature.GroupingSummary with a row that adds a Row of total summary for all the groupings in my Grid View.
Basically the row that Ext.grid.feature.Summary provides...
I have buttons on grid in toolbar that onclick either group the data or ungroup but the totals need to appear always.
And off course the toggle for the summaries.
If you could help would be super please do.
-
29 Jun 2011 1:44 AM #5
I have the same problem. I want to have one summary row at the bottom of the grid. But adding the summary feature on a grid with grouping places the summary in each group, and at the bottom of the grid. Any solutions?
-
11 Jul 2011 10:32 AM #6
-
15 Jul 2011 7:15 PM #7
is what my friend did to make it work
what would you do different ( code is good ).Code:Ext.define( 'BL.view.abstract.grid.feature.Summary', { extend : 'Ext.grid.feature.Summary' ,id : 'blsummary' ,alias : 'feature.blsummary' ,getPrintData: function(index) { if( index ) { var objGrid = Ext.ComponentQuery.query( '#center-container > blgridpanel' ).pop(); var objGroupFeature = objGrid.getView().getFeature( 'blgroupingsummary' ); return objGroupFeature.getPrintData( index ); } return this.callParent(arguments); } ,printSummaryRow: function(index) { if( typeof(index)=='object' ) { if( index.collapsedCls ) { return; } index = undefined; } var inner = this.view.getTableChunker().metaRowTpl.join(''); inner = inner.replace('x-grid-row', 'x-grid-row-summary'); inner = inner.replace('{{id}}', '{gridSummaryValue}'); inner = inner.replace(this.nestedIdRe, '{id$1}'); inner = inner.replace('{[this.embedRowCls()]}', '{rowCls}'); inner = inner.replace('{[this.embedRowAttr()]}', '{rowAttr}'); inner = Ext.create('Ext.XTemplate', inner, { firstOrLastCls: Ext.view.TableChunker.firstOrLastCls }); return inner.applyTemplate({ columns: this.getPrintData(index) }); } // Added "values" argument, for hide grid summary in rows ,closeRows: function() { return '</tpl>{[this.printSummaryRow(values)]}'; } } );Last edited by igor.astakhov; 15 Jul 2011 at 7:17 PM. Reason: grading
-
17 Jul 2011 10:13 PM #8
this works for meCode:/* * Start FIX: Summary + Grouping. Without this fix there would be a summary row under each group * http://www.sencha.com/forum/showthread.php?135442-Ext.grid.feature.Summary-amp-amp-Ext.grid.feature.Grouping */ Ext.override(Ext.grid.feature.Summary, { closeRows: function() { return '</tpl>{[this.recursiveCall ? "" : this.printSummaryRow()]}'; } }); Ext.override(Ext.XTemplate, { recurse : function(values, reference) { this.recursiveCall = true; var returnValue = this.apply(reference ? values[reference] : values); this.recursiveCall = false; return returnValue; } }); /* * End FIX: Summary + Grouping. Without this fix there would be a summary row under each group * http://www.sencha.com/forum/showthread.php?135442-Ext.grid.feature.Summary-amp-amp-Ext.grid.feature.Grouping */
-
1 Jan 2012 7:44 AM #9
After adding the fixes from the post #8, it works
After adding the fixes from the post #8, it works
A much easier way to get the grid grouping feature:
Also, since I have a different implementation of printSummaryRow for grouping summary, I added this before "var inner = ...";Code:var grouping = this.view.getFeature("grid grouping feature id");
Thanks Igor & Qanik,Code:if (index != undefined) return this.view.getFeature("grid grouping feature id").printSummaryRow(index);Yaron Yogev
IT Software Developer
-
28 Jan 2012 9:21 AM #10
hi,
can you post a complete example so that we can unterstand it, thanks


Reply With Quote
