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
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