To use $ .ajaxSetup () to type / apply the content globally to json
$ AjaxSetup ({contentType: "Application / Jason; Charset = UTF-8"});
(see why I had to use application / JSN for this question)
but it breaks jquery jqrid with this error:
invalid JSON primitive: _search
is POST data that he wants to send:
_search = false & amp; Nd = 1274042681880 and rows = 20 & amp; Page = 1 & amp; Sidx = & amp; Sord = asc
which is not in the Jason format, it definitely fails. Anyway what does jqrid tell the contenttype to use?
I searched on jqrid wiki, but in reality there is nothing.
First of all I can extend my old answer forward. It shows how the AJAX request looks inside the jqGrid, so you get the value of $. Regarding Ajaxsetup
overwriting the global setting, jqGrid should use the ajaxGridOptions
parameter.
In addition to the same answer you can see how the If you have trouble using the serializeGridData parameter of JqGrid can be used to create your custom serialization. If you see what the JSON encoding of the parameters looks like, you can read.
serializeGridData and
ajaxGridOptions
, then you can use your JqGrid code section and your use Ask the question of prototype of your server's method of web service to go to.
Comments
Post a Comment