Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:retrieving_data [2012/01/30 16:21]
tony
wiki:retrieving_data [2012/09/18 15:26]
kompi added a method to specify lastpage in case of a function datatype
Line 918: Line 918:
  
 ==== Function ==== ==== Function ====
-This option does not really define the datatype at all, but rather how to handle the data that is provided by the server (which would still come as either xml or json data). The functions defined as a Datatype should (or can) call addXMLData, addJSONData or addRowData once the data has been received. \\ +This option does not really define the datatype at all, but rather how to handle the data that is provided by the server (which would still come as either xml or json data). The functions defined as a Datatype should (or can) call addXMLData, addJSONData or addRowData once the data has been received. If you use a pager, it is useful to call your_grid.setGridParam({lastpage:​ your_number}) to specify the number of pages. \\ 
 Calling Convention: Calling Convention:
 <code javascript>​ <code javascript>​
Line 1028: Line 1028:
 The data can be accessed using a getGridParam method. To do that we need to request this data: \\ The data can be accessed using a getGridParam method. To do that we need to request this data: \\
  
-<code javascript>​jQuery("​grid_id"​).getGridParam('​userData'​)</​code>​ 
- 
-and using the new API (the prefered way) 
 <code javascript>​jQuery("​grid_id"​).jqGrid('​getGridParam',​ '​userData'​)</​code>​ <code javascript>​jQuery("​grid_id"​).jqGrid('​getGridParam',​ '​userData'​)</​code>​
 +
 +and using the old API (not preferr)
 +<code javascript>​jQuery("​grid_id"​).getGridParam('​userData'​)</​code>​
  

QR Code
QR Code wiki:retrieving_data (generated for current page)