PDA

View Full Version : GroupSummary not working



sbodanapu
26 Jun 2012, 10:43 PM
Hi friend,
I am working on the functionality of summing up all the column values and displaying the total in the new row. For instance, if number of hours i had spent on different activities like work,play,reading on any week day are represented in different rows in a column, in the last row of the grid the total of all the hours listed should be displayed..
For this i am using GroupSummary plugin which is attached to this document.
I am including this plugin in the same js file where i need this group summary functionality.But the control is not even going to the summaryType 'sum' defined in the plugin..
For a grid,i am calling this GroupSummary plugin like this..


Grid used
var summary = new Ext.ux.grid.GroupSummary();
var effortgrid = new Ext.grid.EditorGridPanel({
id: 'effortgrid',
frame: true,
width: 1570,
height: 600,
store: effortStore,
clicksToEdit: 1,
//autoScroll:true,
sortable: true,
trackMouseOver: true,
loadMask : {msg:"Loading..."},
colModel:effortGridColumnModel,
plugins:[summary],
stripeRows: 'true',
toggleSummary :true,
......................................

.......................................

Column Model for the grid


header : rec.data.monday+"<br>"+"Monday",
dataIndex : 'monday',
id:'eff_monday',
summaryType:'sum',
summaryRenderer: floatRenderer,
editor:selectEffortValue
}


But,i am unsuccessful in rendering the total sum of the column name "monday" .
can you please suggest me anything to work on this..

Thanks in Advance,
Sandeep

carol.ext
27 Jun 2012, 12:33 PM
What version of Ext JS are you using? If 4.x, then take a look at the grid Features ...

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.feature.GroupingSummary
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.feature.Summary

If not 4.x, then this thread could be moved to the help forum for that version.

Are you using GroupSummary or GridSummary?

I see this :

var summary = new Ext.ux.grid.GroupSummary();
But your attachment is GridSummary.