Forum
08:48
23/12/2010
Hello Friends,
I am using jqGrid which retrieves the data from the server. It returns the jSon Object . Json object contains key/value pairs .
I want to handle this data at client side using jqGrid . I can not understand that How to change the structure of jsonReader as per my requirement.
Can anyone help me ?
In my Grid , there are two row, one is "ID" and second is "Value" . The json object retruns the id-values pairs.
Then what will be the value of root and other things in jsonReader ?
Thanx,
Gunjan Shah.
07:37
23/12/2010
Hello Izumeroot,
Format of json is :
{"rows":[{"id":1123,"cell":[1123,300]},{"id":1087,"cell":[1087,300]},{"id":1067,"cell":[1067,301]},{"id":1064,"cell":[1064,500]},{"id":1174,"cell":[1174,2000]}]}
Its working fine in internet explorer, but fireFox's error console shows the error : "not well formed" .
Thanx..
Gunjan Shah.
I have such json in my grid:
{"page":"1","records":3,"total":1,"userdata":"","rows":[{"id":"1","title":"Wrong Title After Saving","date":"2010-09-03","is_active":"1","status":"New Ticket"},{"id":"2","title":"Can't remove a record","date":"2010-10-12","is_active":"1","status":"Assigned"},{"id":"3","title":"Add refresh button fro grid","date":"2010-12-07","is_active":"1","status":"Done"}]}
My jsonReader is:
jsonReader: {
root: "rows",
page: "page",
total: "total",
records: "records",
repeatitems: false,
id: "0"
}
But I also use another json structure for default jsonReader :
{"page":"1","records":3,"total":1,"userdata":"","rows":[{"cell":["652ABB6C2E4784317CA9222A23BA8940","test_usr_r@mail.test","1","10 \u0441\u0435\u043d 2010","0","0","0"]},{"cell":["652ABB6C2E4784317CA9222A23BA8940","user2@mail.test","1","20 \u0438\u044e\u043b 2010","0","0","0"]},{"cell":["652ABB6C2E4784317CA9222A23BA8940","izumeroot@gmail.com","1","23 \u0430\u0432\u0433 2010","0","0","0"]}]}
Most Users Ever Online: 715
Currently Online:
40 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66