Forum


23:09

09/11/2010

I am trying to load JSON data into a grid. I keep getting this error. My JSON data appears to be being correctly returned. Firebug says the error is in this line of the jqGrid code: if(g.cell)L=o[g.cell][C]||L}v=h===1?0:h;v=(v+d)%2==1?X:"";
Am I missing an option or something I should be setting?
I'm on a tight deadline and I can't get the grid to load any data at all. It says its loading and just hangs at this error. I've used jqGrid before with arrays but never with JSON data.
Any help is appreciated.
Version 3.8.1
Here's my code for calling the grid:
$('#cell_log_link').click(function(){
$('#activate').hide();
$('#contact_info').hide();
$('#update_account').hide();
$('#login').hide();
$('#storage').hide();
$('#validate').hide();
$('#cell_log').show();
$('#message').html("");
$('#cell_log_grid').jqGrid({
url:'XHR/get_cellLog?name='+$('input[name="UserName"]').val(),
datatype: 'JSON',
mtype: 'GET',
colNames:['Cust Code','Designation','Study Number','Start Date','Status'],
colModel :[
{name:'Cust Code', index:'Cust Code', width:100},
{name:'Designation', index:'Designation', width:175},
{name:'Study Number', index:'Study Number', width:100, align:'left'},
{name:'Start Date', index:'Start Date', width:75, align:'right'},
{name:'Status', index:'Status', width:100},
],
jsonReader : {
root:"cell_log_data",
page: "currpage",
total: "totalpages",
records: "numrecords"
},
altRows: true,
// gridview: false,
height: "100%",
pager: '#pager',
rowNum:50,
rowList:[10,25,50],
sortname: 'Start Date',
sortorder: 'desc',
subgrid: false,
viewrecords: true,
caption: 'Cell Log'
});
});
Most Users Ever Online: 715
Currently Online:
64 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