Forum


15:40

Hello,
I am trying to show columnm summary on the footer. I have enabled footerrow : true, userDataOnFooter : true at the grid configuration. I have the summary information from the code base and wondering if anyone can help me on how to pass the summary information to the client as JSON object.
Here is the json format, I use to display the data.
{totalpages: '2', currentpage: '1', pagerecords: '14',itemrows: [
{Id:'941', CheckAmt:'10.00' },
{Id:'951', CheckAmt:'5.00' },
{Id:'952', CheckAmt:'2.60' },
{Id:'957', CheckAmt:'5.00' } ]}
How can I pass the total amount to the client with the json strng. CheckTotalAmt: '22.60'
- thanks
Vinoth
23:14

Moderators
30/10/2007

Hello,
You should provide the additional information in user data array where the summs are here or use the getCol method to summ the needed row and put the info with footerData method.
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.
13:55

Tony,
thanks for your reply. I am using the below script at the grid configuration level and the data from server.
jsonReader:{
root: 'itemrows',
page: 'currentpage',
total: 'totalpages',
records: 'pagerecords',
userdata: 'SummaryData'
},
-------------
{totalpages: '2',
currentpage: '1',
pagerecords: '14',
SummaryData: {CheckAmt: '22.60'}
itemrows: [{Id:'941', CheckAmt:'10.00' },{Id:'951', CheckAmt:'5.00' },{Id:'952', CheckAmt:'2.60' },{Id:'957', CheckAmt:'5.00' } ]}
Please advise.
thanks,
Vinoth
Most Users Ever Online: 715
Currently Online:
149 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