xmlReader: {userdata: "userdata",... }
In the data received from the server, this could be structured as follows (in xml):
<invoices> <request>true</request> <userdata name="totalinvoice"> 240.00 </userdata> <userdata name="tax"> 40.00</userdata> ... <result> <row> <cell>data1</cell> <cell>data2</cell> <cell>data3</cell> <cell>data4</cell> <cell>data5</cell> <cell>data6</cell> </row> ... </result> </invoices>
If using json data, the definition might look like this:
jsonReader : { ... userdata: "userdata", ... }
and the data received, like this:
{ total: "xxx", page: "yyy", records: "zzz", userdata: {totalinvoice:240.00, tax:40.00}, rows : [ {id:"1", cell:["cell11", "cell12", "cell13"]}, {id:"2", cell:["cell21", "cell22", "cell23"]}, ... ] }
When this data has been received, this information is stored in the userData array of the options array. Whichever format the data comes in, in this case we would have:
userData = {totalinvoice:240.00, tax:40.00}
The data can be accessed two ways.
jQuery("grid_id").getReturnedData()
jQuery("grid_id").getGridParam('userData')
Both methods return the same array.