I’m saw this line a lot but can’t find an answer:
$.jgrid.useJSON = true;
What is the purpose?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Typically I include jqGrid in the following way
So one should first include
grid.locale-en.jswhich defines$.jgrid, then you can set$.jgrid.useJSONand$.jgrid.no_legacy_apiand the later implementation of jqGrid injquery.jqGrid.min.jswill use the settings.The option
$.jgrid.useJSONwill be used in$.jgrid.parsefor parsing JSON strings either withJSON.parseor witheval.To be exact the method
$.jgrid.parsewill be used not so frequently. Mostly two cases are relevant:datastrin case if the value ofdatastrhas “string” type anddatatype: "jsonstring"postData.filters(the filter parameter used with local datatype and for advanced searching)subgridtype: "json"jqGridImportmethod implementationSo the usage of
$.jgrid.useJSON = true;is recommended, but it will influence the performance of your program probably not really because the most important cases of JSON parsing will be made typically by jQuery internally (typically byjQuery.ajax) and not by jqGrid code.