In the example listed here, how can I get the grid data as JSON?
Reference Link
The JQuery Serialize works, but it would be nice if I am able to get each row as a JSON Object, so I can parse the data.?
You can use the .appendGrid('getAllValue')
function to get the grid data as javascript objects. You can parse them directly or encode them as JSON.
Example:
var data = $('#tblAppendGrid').appendGrid('getAllValue')
returns an array where each element is the data from one table row as object.
data[0]
will be the first row.
JSON.stringify(data)
will be a JSON string with all the data from your table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With