Forum
17:20
06/09/2009
Hi Tony,
I'm trying to get a summary row just as shown in your Demos -> Grouping -> Summary Footers example, but I don't want to use the grouping function.
I tried to add the summaryType and summaryTpl options to my colmodel columns, but it seems to ignore these option when grouping is not set to true.
Is there anyway to get the same result as in your example without enabling grouping and without using the userDataOnFooter option? If not, wouldn't it be a good idea to implement the summary footer for ungrouped rows the same as you've implemented for grouped rows?
Kind Regards,
Lotte-Sara
18:48
Moderators
30/10/2007
Hello,
Some things happen as tey are defined, otherviese not.
To answer of your question - I think yes this is possible,
Just use the method footerData
http://www.trirand.com/jqgridw.....ki:methods
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
16:18
06/09/2009
Hoi Tony,
It seems to me that the footerData method is basically the same as using userDataOnFooter because you have to feed it an array with name:value pairs. I don't want to calculate the totals myself, I want jqgrid to do this for me based on the given summaryType and summaryTpl in my colModel options. This is all done for you when grouping is enabled, but when grouping is disabled, these options are ignored.
{ 'name': 'fldVerkoopOrderRegelID','index': 'fldVerkoopOrderRegelID', 'hidden': true },
{ 'name': 'fldArtikelcode', 'index': 'fldArtikelcode', 'width': 120, 'fixed': true, 'summaryTpl': '<stong>Totaal</strong>'
'editable': true, 'formatter': $.unitTbookOrders.orderTypeFormatter },
{ 'name': 'fldOmschrijving', 'index': 'fldOmschrijving' },
{ 'name': 'fldAantalVerkocht', 'index': 'fldAantalVerkocht', 'width': 50, 'fixed': true, 'sorttype': 'float', 'formatter': 'number' },
{ 'name': 'fldVerkoopprijs', 'index': 'fldVerkoopprijs', 'width': 50, 'fixed': true, 'sorttype': 'float', 'formatter': 'number' },
{ 'name': 'fldRegelkorting', 'index': 'fldRegelkorting', 'width': 50, 'fixed': true, 'sorttype': 'float', 'formatter': 'number' },
{ 'name': 'fldBedragNaKortingen', 'index': 'fldBedragNaKortingen','width': 50, 'fixed': true,
'sorttype': 'float', 'formatter': 'number', 'summaryType': 'sum' }
],
Regards,
Lotte-Sara Laan
20:21
10/08/2009
Hi Lotte-Sara,
If you want calculate a sum from the cells in one column in the current page you can do this with respect of getCol methed
Then with respect of
you can place the sum in the footer.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
66 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66