If you remove loadonce:true
and use datatype:"json"
or "datatype:xml"
jqGrid option then your server must implement pagination. The server receive some parameters which will be appended to the url
in case of 'GET' requests or send in the HTTP body in case of "POST" requests. This parameters are rows
, page
, sidx
, sord
. For example if your table have a column with the index 'Name' as the current sort column and rowNum: 20
then your url will be appended with ?rows=20&page=1&sidx=Name&sord=asc
. Your server should construct SELECT statement to the database where the data are placed with ORDER BY Name asc
then divide the result in pages 20 rows per page and send back the first page of the results. (See http://stackoverflow.com/questions/3527617/get-current-url-including-parameters-of-jqgrid/3530191#3530191 for a little more information). For a PHP with MySQL on the server see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:first_grid#php_and_mysql_example_file as an example.
So in case of loadonce:false
or no loadonce
parameter your server is responsible for sorting and paging of the data. If it is not work you should verify your server code.