is it possible to store server returned json data in jqgrid to display columnnames models data dynamically for every request ?
$("#grid").jqGrid({
type: "GET",
url: "",
var columnNames = $("#grid")[0].p.colNames,
var columnModel = $("#grid")[0].p.colNames,
var columnData = $("#grid")[0].p.colNames,
datatype: 'jsonstring',
datastr: columnData,
colModel: columnModel,
jsonReader: {
root: 'innerWrapper.rows',
page: "result.gridData.outerWrapper.page",
total: "result.gridData.outerWrapper.total",
records: "result.gridData.outerWrapper.total",
repeatitems: false,
},
gridview: true,
pager: "pager",
height: "auto",
rowNum: 10,
width:"auto",
height:"auto",
rowList: [10, 20, 30,40],
viewrecords: true,
caption:"Graph Data",
rownumbers: true,
});