In the current question, you continue the extremely exotic JSON input format.
First of all, I recommend never using columns containing metacharacters in the value of the name property in colModel . In your case, you used "name": "First Name" and "name": "Last Name" , which can follow serious problems. You must replace the name property with names like "name": "FirstName" .
The next problem is that your data can only be read using the jsonmap colModel . Therefore, you must define the property in the JSON input. In addition, you cannot use the jsonmap colModel property with datatype: 'local' . Thus, you need to either convert the information from the result.mypage.outerwrapper.innerwrapper.rows part of the result.mypage.outerwrapper.innerwrapper.rows input into some more readable format, or use datatype: 'jsonstring' .
So you can fix the JSON data as follows
{ "colModel": [ { "name": "ID", "index": "ID", "width": 60, "align": "left", "jsonmap": "cells.0.value" }, { "name": "FirstName", "index": "FirstName", "width": 140, "align": "left", "jsonmap": "cells.1.value" }, { "name": "LastName", "index": "LastName", "width": 160, "align": "left", "jsonmap": "cells.2.value" } ], "colNames": [ "ID", "First Name", "Last Name" ], "mypage": { "outerwrapper": { "page":"1", "total":"1", "records":"1", "innerwrapper": { "rows":[ { "id":"1", "cells": [ { "value":"12345" }, { "value":"David" }, { "value":"Smith" } ] } ] } } } }
and code to the next
$.ajax({ type: "GET", url: "SK11-4.json", data: "", dataType: "json", success: function (result) { var columnData = result.mypage.outerwrapper, columnNames = result.colNames, columnModel = result.colModel; $("#dataGrid").jqGrid({ datatype: 'jsonstring', datastr: columnData, colNames: columnNames, colModel: columnModel, jsonReader: { root: 'innerwrapper.rows', repeatitems: false }, gridview: true, pager: "Pager", height: "auto", rowNum: 5, rowList: [5, 10, 20, 50], viewrecords: true }); } }); $("#dataGrid").jqGrid('navGrid', '#Pager');
As a result, you get demos that work.