jqgrid can not work by set jsonReader ,repeatitems : false
firstly my jqgrid is getData by array
$(listvar).jqGrid({
}
$responce = new stdClass();
$responce -> page = $page;
$responce -> total = $total_pages;
$responce -> records = $count;
$responce -> rows[$num]['id'] = $row["id"];
$responce -> rows[$num]['cell']= array("fid" => $row['fid'], "fname" => $row['fname']);
echo json_encode($responce);
it works fine; ;but i want to by key value ; then i change code so jqgrid can get data by key value way; I reference
Using key/value pairs for jqGrid cell data
and
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data
$(listvar).jqGrid({
enter code here`jsonReader : {
repeatitems : false,
//others default value;
},
}
mycode:
$responce = new stdClass();
$responce -> page = $page;
$responce -> total = $total_pages;
$responce -> records = $count;
$responce -> rows[$num]['id'] = $row["id"];
$responce -> rows[$num]['cell']= array("fid" => $row['fid'], "fname" => $row['fname']);
echo json_encode($responce);
:web reponse ;
{"page":"1","total":1,"records":"1","rows":{"id":1,"cell": [{"fid":"153","fname":"\u624b\u673a"}]}}
but jqgrid can not display data; what is the problem ?