My Actionmethod to get grid data
public ActionResult GetJqGridData(string page, string rows, string sidx, string sord)
{
var jqGridData = new
{
.........
.........
TotalPages = (int)Math.Ceiling((double)totalRows / pagesize),
CurrentPage = page,
Total = totalRows,
Data = QuotationDetails.Skip((_page - 1) * Convert.ToInt32(rows)).Take(pagesize).ToList(),
};
return Json(jqGridData, JsonRequestBehavior.AllowGet);
}
jqgrid
$("#MyDemoGrid").jqGrid({
url: baseurl + '/MyController/GetJqGridData',
datatype: "json",
jsonReader: {
root: 'Data',
page: 'CurrentPage',
total: 'TotalPages',
records: 'Total',
id: 'TransID',
repeatitems: false
},
........
........
For example pagesize=15,i have more than 100 records,am getting grid param values in action method,but jqgrid is not showing values on footer which am passing(Totalpages,Total).
Any one can suggest me on this.
Any one can share me the link to implement server side pagination.
Thank you