Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Actionmethod to get grid data
C#
public ActionResult GetJqGridData(string page, string rows, string sidx, string sord)
        {

C#
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
JavaScript
$("#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
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900