The related options (in options array) for manipulating different types of data are:
datatype: the possible options are - 'xml', 'json','clientSide' or 'local', 'xmlstring', 'jsonstring' and 'function (...)'
The default mapping for xml data is as follows:
xmlReader : { root: "rows", row: "row", page: "rows>page", total: "rows>total", records : "rows>records", repeatitems: true, cell: "cell", id: "[id]", subgrid: { root:"rows", row: "row", repeatitems: true, cell:"cell" } };
If your server can provide data in this structure, you need to do nothing more; but if not, there is a way (several ways) to handle the data you are given. See XML Data.
The default mapping for json data is as follows:
jsonReader : { root: "rows", page: "page", total: "total", records: "records", repeatitems: true, cell: "cell", id: "id", subgrid: { root:"rows", repeatitems: true, cell:"cell" } }
In colModel, the related options are xmlmap for the description of an xml field, and jsonmap for the description of a json field. For example:
will cause jqGrid to search in the xml data for an 'amt' tag (when the repeatitems option is set to false).colModel : [ {name:'amount',..., xmlmap:'amt'...}...]