I am sending json encoded results from my controller to my view and displaying data in jqgrid. The data is displaying fine. However, I added two integers to the response I am returning and I want to display them in the grid in one of the column's summary. This is what it looks like in the controller:
$response->TotalNum = $total_items;
$response->PercentNum = $percent_items;
return json_encode($response);
How do I access those values in my grid? I would like to append them to the summary. Sort of like this, though I know this won't work:
{name:'itemcounts',index:'itemcounts', width: 50, sorttype:'int',summaryType:'sum', summaryTpl: 'Total<br>Count: {0}<br>Total Items: **$response['TotalNum']** (**$response['PercentNum']**%)', formatter:'number',formatoptions:{decimalPlaces: 0}},
Thank you!