Forum
Topic RSS
Related Topics
21:19
19/08/2010
OfflineHi,
I'm hoping someone can help me out, I'm having some trouble binding my json data to the grid, it looks as if the correct number of rows I am expecting are being displayed in my grid, but nothing seems to be bound inside my columns.
My json data looks like this,
{"page":1,"total":1,"records":2,"rows":[{"Id":1,"Start":"7/19/2010 12:00:00 AM","End":"8/18/2010 12:00:00 AM","MediaId":"E0001"},{"Id":1,"Start":"7/19/2010 12:00:00 AM","End":"8/18/2010 12:00:00 AM","MediaId":"E0002"}]}
Which I'm trying to bind to my grid using this code,
$("#job-list").jqGrid(
{
url: "Report/RetrieveJobs/" + startDate + "/" + endDate + "/" + clientId + "/" + projectId + "/" + mediaId,
datatype: "json",
height: 200,
jsonReader : {
root: "rows",
page: "page",
total: "total",
records: "records",
cell: "",
id: "0"
},
colNames: ['Id', 'Media Id', 'Start Date', 'End Date'],
colModel: [
{ name: 'Id', index: 'Id', width: 55 },
{ name: 'MediaId', index: 'MediaId', width: 90 },
{ name: 'Start', index: 'Start', width: 100 },
{ name: 'End', index: 'End', width: 100 }
],
sortname: 'Id',
sortorder: "asc",
multiselect: true,
loadComplete: showJobList
});
When the data is bound, the loadComplete callback is successfully being called, and like I said the correct number of rows are being displayed on the column, my only problem is that there is no data being displayed in the column cells.
If someone could give me some guidance I would really apprecaite it.
Thanks in advance,
Matt.
Most Users Ever Online: 994
Currently Online:
19 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