Click here to Skip to main content
11,927,156 members (54,682 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# jQuery JQGrid ASP.NET4
Hello Experts,

(Web application information- I am using ASP.NET MVC, .Net framework 4 and C#)

I am using jqgrid on a webpage(view) to display contents from model.

            url: '<%= @Url.Action("ViewData", "Data") %>',
            datatype: 'json',
            mtype: 'GET',
            toppager: true,
            pager: jQuery('#pager'),
            rowNum: 10,
            rowList: [5, 10, 20, 50],
            sortname: 'ID',
            sortorder: "desc",
            multiselect: true,
            viewrecords: true,

and my controller is this

       public ActionResult ViewData(string sidx, string sord, int page, int rows ,GridSettings grid)
           // code goes here..
           // return JSON object.


I have applied Virtual Scrolling, so whenever the user will scroll on the page, the data will be loaded in jqgrid.

When I debugged the application, the "page" parameter in controller must show incremental values at each scroll but it is not behaving normally.
-If I keep the "sortOrder" as "desc" then the "page" values I get in controller are '1' in first pass, '3' in second pass, '5' in third pass and so on.

-If I keep the "sortOrder" as "asc" then the "page" values I get in controller are '1' in first pass, '2' in second pass, '5' in third pass, '6' in fourth pass and so on.

I have tried my level best to find out where the problem lies but I am not able to find the reason behind this. Frown | :(

Any help would be highly appreciated.
Thanks in advance.
Posted 8-Apr-13 21:41pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hello folks,

I got the solution after some more research.

The problem was occurring due to the bug in jqgrid.

I was using jqgrid version 4.4.1 and I read that pagging bug was solved in version 4.4.3

I gave a try, updated the latest version ( jqgrid version 4.4.4) in my application and now all's working perfectly fine.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100