Hi I am using Ext Js version 4.1.8 and I want to add paging on my extjs grid.
That is working fine, but if I change my json format in my php file and change the root type to someother string like 'users' I do not see any data
Please help so I can add totalProperty in reader of my store and perform paging
Paging in Ext Grid
I have been using
Code:
Ext.create('Ext.data.Store', {
model: 'List',
proxy:{
type: 'ajax',
api:{
read:'getJson.php',
},
extraParams:{
PRKEY : selectedProjId
},
},
reader:{
type: 'json',
root: 'data',
}
});
That is working fine, but if I change my json format in my php file and change the root type to someother string like 'users' I do not see any data
Here is my json creation code in getJson.php
Code:
//in a loop
$aNode = array(
"Name" => "My Name",
"ID" => "123");
array_push($nodeArr, $aNode);
//end of loop
$json = new Services_JSON;
$jsonResult = array(
'success' => "true",
'users' => $nodeArr
);
echo json_encode($jsonResult );
Please help so I can add totalProperty in reader of my store and perform paging
Paging in Ext Grid
Aucun commentaire:
Enregistrer un commentaire