JSON and jqGrid. What is the "userdata"?

I am having trouble understanding what all the fields in the JSON data source mean for jqGrid, and I don't see any documentation for this anywhere.

An example I'm trying to understand is the following: http://www.trirand.com/blog/jqgrid/jqgrid.html , and then the first example in the "JSON Data" section

JSON data can be accessed here: http://www.trirand.com/blog/jqgrid/server.php?q=2&rows=10&page=2

One of the things that confuse me in JSON is snipplet:

"userdata":{"amount":1520,"tax":202,"total":1724,"name":"Totals:"}

What exactly does this do?

+3
source share
2 answers

. , . . URL- rows=10&page=2, " , 10 ". URL- "server.php? Q = 2", jqGrid. 10 . http://www.trirand.com/blog/jqgrid/server.php?q=2&rows=10&page=2 url 3 ( 10)

{"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:"}
}

: "userdata"? . . , , jqGrid jsonReader (. http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data). JSON- , userdata .

var myUserData = jQuery("grid_id").getGridParam('userData');

(. http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#user_data).

3.5 jqGrid, jqGrid, "Summary Footer Row" (. http://www.trirand.com/blog/jqgrid/jqgrid.html " 3.5", " " ). , URL- : "server.php? Q = 2". userdata , " ".

+7

, -, "" "" "" , , "Inv No" .

, -, , , , , .

+1

Source: https://habr.com/ru/post/1752002/


All Articles