Forum
Topic RSS
05:37
Hi all, I'm having some problems with using objects/map rather than arrays for my cell data. I've followed the docs closely but I can't get it to work. I use jqGrid 3.6.1.
If I do this:
jQuery("#currentCompoundsGrid").jqGrid({
datatype: 'jsonstring',
datastr: '{total: "1", page: "1", records: "1", rows: [{id:"1", cell:["Tester", "K47"]}]}',
jsonreader: {
repeatitems: true
},
colNames:['Tester', 'Ki'],
colModel:[
{name:'Tester', width:400},
{name:'Ki', width:200}
],
viewrecords: true,
caption:"Aktuelle Compounds"
});
all is well, but if I do that:
jQuery("#currentCompoundsGrid").jqGrid({
datatype: 'jsonstring',
datastr: '{total: "1", page: "1", records: "1", rows: [{id:"1", Tester:"Tester", Ki:"K47"}]}',
jsonreader: {
repeatitems: false,
cell: "",
id: "0"
},
colNames:['Tester', 'Ki'],
colModel:[
{name:'Tester', width:400},
{name:'Ki', width:200}
],
viewrecords: true,
caption:"Aktuelle Compounds"
});
The Grid keeps saying 'Loading' and I get a 'cur is undefined' error in my Firefox error console. I have tried leaving the cell and id jsonreader params, setting id to "0", even putting in a 'cell' element that contains the map of values - no luck.
Can anybody shed some light onto this? I'd really appreciate this to work as some of my data rows might end up containing not all data which means the positional array stuff will break eventually.
05:15
Moderators
30/10/2007
OfflineHello,
You should set jsonReader instead of jsonreader
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 994
Currently Online:
46 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