Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is very easy to explain. The server produce a data which will be used to fill the grid. The data can be paged. So in the URL send to the server we can find <code>rows=10&amp;page=2</code>, which means "give me the second page of data, when the page size is 10 rows". These additional parameters will be added to the main url "server.php?q=2" defined as one of jqGrid parameters. The server give back 10 or less rows. In case of <a href="http://www.trirand.com/blog/jqgrid/server.php?q=2&amp;rows=10&amp;page=2" rel="noreferrer">http://www.trirand.com/blog/jqgrid/server.php?q=2&amp;rows=10&amp;page=2</a> url the server gives back only 3 last rows (from the total 10)</p> <pre><code>{"page":"2", "total":2, "records":"13", "rows":[ {"id":"11","cell":["11","2007-10-06","Client 1","600.00","120.00","720.00",null]}, {"id":"12","cell":["12","2007-10-06","Client 2","700.00","140.00","840.00",null]}, {"id":"13","cell":["13","2007-10-06","Client 3","1000.00","0.00","1000.00",null]} ], "userdata":{"amount":2300,"tax":260,"total":2560,"name":"Totals:"} } </code></pre> <p>Now about your main question: what is "userdata"? There exists an old way to send an additional information from the server to the client together with the main data. It can be absolutely free data. All data received from server will be parsed by jqGrid with respect of so named <code>jsonReader</code> (see <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data" rel="noreferrer">http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data</a>). A standard JSON reader is defined so, that it read data <code>userdata</code> property from the root of data sent and just save it. This data is accessible with respect of</p> <pre><code>var myUserData = jQuery("grid_id").getGridParam('userData'); </code></pre> <p>(see <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#user_data" rel="noreferrer">http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#user_data</a>).</p> <p>Starting with the version 3.5 of jqGrid it is possible to place an additional last row in the jqGrid which could play "Summary Footer Row" role (see on <a href="http://www.trirand.com/blog/jqgrid/jqgrid.html" rel="noreferrer">http://www.trirand.com/blog/jqgrid/jqgrid.html</a> under "New in version 3.5", "Summary Footer Row" example). Now you can see, the url in the example is absolutely the same: "server.php?q=2". So in the first example <code>userdata</code> will not be used, but it will be used in "Summary Footer Row" example.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload