Forum
Topic RSS
Related Topics
01:15
21/09/2009
OfflineI have looked through the documentation, read the forum, searched the net and cannot figure out how to get json data into my grid.
The data currently looks like this:
{"page":1,"total":24,"records":473,"rows":[{"id":"0","cell":[" Weather Data Method","Using testtag.php which is the traditional method to get the weather information data from Weather Display."]},{"id":"1","cell":["apparentsolartemp","22.5"]},{"id":"2","cell":["apparentsolartempc","-5.3"]},{"id":"3","cell":["apparentsolartempf","22.5"]},{"id":"4","cell":["apparenttemp","22.5"]},{"id":"5","cell":["apparenttempc","-5.3"]},{"id":"6","cell":["apparenttempf","22.5"]},{"id":"7","cell":["avgspd","0.0 mph"]},{"id":"8","cell":["avrainapr","1.15"]},{"id":"9","cell":["avrainaprnow","3.24"]},{"id":"10","cell":["avrainaug","0.38"] ...
I have tried other formats.
colModel:[
{name:'id',index:'id', width:55},
{name:'Item',index:'item', width:290},
{name:'Value',index:'value asc', width:300}
],
rowNum:20,
rowList:[20,40,60],
pager: '#pager2',
sortname: 'id',
viewrecords: true,
sortorder: "asc",
caption:"The Information"
});
jsonReader: { root:"rows", cell:"cell" };
I suppose the problem is that the column names are not in the json data so jqGrid cannot find the data, but I don't see how to get them into the json.
Any suggestions wlll be appreciated.
Bill
Most Users Ever Online: 994
Currently Online:
12 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
Log In
Home