jquery - page count in jqgrid with server side paging -


I am implementing server side paging (with MVC4) for JQGrid. I'm able to put it out I'm not using the Jukeide Pager option. I am using custom pager implementation instead. For this, I need to get the total pages returned by the server.

I have tried the following:

  grid.getGridParam ('lastpage') - always returns 1, which makes sense because I only have one in the grid grid I am returning the contents of the page. Getrigrad ('Total') - I tried to do this because I was setting this value in the controller, but it is retrieving the zero grid. Gridperm ('Records') - always gives 10, the size of my page.  

I think you have the option of loadonce: true Use the Customer Support paging, sorting and filtering / searching option in the wrong case using the loadonce: true option in the server all the rows < / Strong>. In the case of use loadonce: true option value total , record and page will be ignored and the same value The total number of items returned from the server will be set on . Because you only returned 10 items (the first page items), the values ​​of the parameters described in your query are perfectly fine. Well I would recommend you to use the loadonce: true option if you do not have such a large dataset (for example 1-10 thousand lines). Items ordered by the requested parameter ( sidx and sord ) should return the server in the all case.

You can return the array of all sorted items to the server without any additional information.

The way jqGrid parameters are as per page meaning:

  • page - 1-based number of current page
  • Last page - Page number of last page
  • line number - page size - Maximum number of records in a page (in the last page
  • Reccount - Display in page -
  • Record - Total records (on all pages) in the grid
  • The total number of records (less than or equal to the page size line number)

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -