how to use serializeRowData option with editRow method in jqgrid to post a json data to server ?
views:
318answers:
1
+1
Q:
how to use serializeRowData option with editRow method in jqgrid to post a json data to server
A:
serializeRowData
may be used to take a row's data and serialize it to (for example) JSON or XML prior to POSTing it to the server. Here is an article that provides an overview of its usage. Basically, here is example code to use it along with json2.js (from json.org) to serialize data to JSON prior to being submitted:
jQuery("#tableid").jqGrid({
...
serializeRowData: function(postdata){
return { x01: JSON.stringify(postdata) };
}
...
});
Does that help?
Justin Ethier
2010-03-02 03:33:49
Thanks a lot, it works.
craneleeon
2010-03-03 01:12:19