Forum
Topic RSS
Related Topics
23:31
28/05/2010
OfflineI am checking out the tool and doco, and things looked pretty good. I integrated jquery 1.4.2 and jqGrid 3.6.5. When I attempt to load the data.. all I get in the screen is a "Loadng…" box [1]. The data comingback seems to match the expected data structure with the excpetion of order:
My code for invoking the Grid is:
%table#t2
#pager
:javascript
jQuery(document).ready(function(){
jQuery("#t2″).jqGrid({
url:'/consumertypes.json',
jsonreader: {cell:"", id:0, repeatitems:true},
datatype: 'json',
mtype: 'GET',
colNames:['ID','Label'],
colModel :[
{name:'id', label:'ID', width:55},
{name:'label', label:'Label', width:90},
],
rowNum:10,
rowList:[10,20,30],
sortname: 'label',
sortorder: 'desc',
viewrecords: true,
caption: 'Consumer Types'
});
});
So.. a couple of questions..
1) Are the latest versions incompatible?
2) Does the order of the data coming back matter? The doco shows numbers as strings, does that matter?
2) Am I making some other stupid user error (pebkac)?
Thanks in advance!
[1] http://bkearney.fedorapeople.o.....jqGrid.png
00:44
04/11/2009
Offline1. I use jquery 1.4.2 and jqGrid 3.6.5. with no problems.
2. The order of the data coming back doesn't matter.
The only thing I see wrong with you code is the extra comma at the end of this line:
{name:'label', label:'Label', width:90},
I don't see anything wrong with your json.
Sometimes I get the same hanging, but normally it's because I made some change to some js that creates an error (like an 'undefined' variable somewhere).
tim
Most Users Ever Online: 994
Currently Online:
15 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