Dennis
Dennis

Reputation: 31

what is the jqgrid footer json format

i am currently trying to solve my problem with the total in the footer. i tried searching in the internet with some examples, but they are using php, and i am using java. can you please show me what exactly the json looks like for this php script

$response->userdata['total'] = 1234;
$response->userdata['name'] = 'Totals:'; 

is this what it looks like?

{"total":0,**"userdata":[{"total":1234,"name":"Totals"}]**,"page":0,"aData":.....

thanks.

Upvotes: 1

Views: 2081

Answers (2)

Oleg
Oleg

Reputation: 221997

userdata must look like

"userdata":{"total":1234,"name":"Totals"}

instead of

"userdata":[{"total":1234,"name":"Totals"}]

to be able be displayed in footer if your columns have names "total" and "name".

Upvotes: 3

lomaxx
lomaxx

Reputation: 115773

by default, the key data you need for the jqGrid footer in your json response are page, total and records, so in your json response make sure you have something that looks like this:

{"page":"1","total":2,"records":"13","rows":[{....}]}

Upvotes: 0

Related Questions