Thursday, 15 April 2010

jquery - My Jqgrid pager shows 1 of 0, if there is no data in jqgrid -


  1. Code below is my JQGRID code, I am using JsonReader to bind data in the grid. 2. My service response is JSON, so I'm changing to "Local Reader", if the data is not changing then I am using JSON Reader.

    This is my JQGG pager, even if there is no data, pager shows 1 to 1 .

    You have given the correct context that can play an additional role for the problem. I think you use the latest version of jqGrid with the fixes already described.

    I think the root of your problem is very simple, the option you use is jsonReader in the page property defined < Pre> page: function () {return1; }

    This means that the souls display page number 1, even if the empty array is available in the response from the server. I think you should change the following code

      Page: function (obj) {return obj.length & gt; 0? 1: 0; }   

    or

      Page: function (obj) {obj.length & gt; 0? "1": "0"; }    

No comments:

Post a Comment