Forum


03:33

24/09/2009

I am trying to use the JQuery plugin jqGrid with an asp .net mvc app.
I am passing the grid a JSON object in the following format as in the jqGrid documentation:
{
“total”:1,
“page”:1,
“records”:10,
“rows”:
[{
"i":1,"cell":["Test","Testical"]},
{”i”:2,”cell”:["Test1","Testical"]},
{”i”:3,”cell”:["Test2","Testical"]}]
}
and the jqGrid is setup:
jQuery(”#searchResults”).jqGrid({
url: '/Customer/SearchResults/',
datatype: 'json',
mtype: 'GET',
colNames: ['Surname', 'Forename'],
colModel: [
{ name: 'Surname', index: 'Surname', width: 200, align: 'left' },
{ name: 'Forename', index: 'Forename', width: 200, align: 'left'}],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'Id',
sortorder: “desc”,
viewrecords: true,
imgpath: '/scripts/themes/coffee/images',
caption: 'My first grid'
});
Its hitting my action but the grid is stuck on loading, any ideas what I am doing wrong??
Thanks
19:03

I get the following error message from IE8:
Errordetails webpag
Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Tijdstempel: Fri, 25 Sep 2009 00:02:12 UTC
Message: 'ts.p.colModel[...].name' is empty or no object
Line: 10
Teken: 10946
Code: 0
URI: http://xxx/js/jquery/jquery.jq.....rid.min.js
05:39

Moderators
30/10/2007

Check for not needed commas in colModel
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: 715
Currently Online:
63 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