Forum
19:07
23/11/2009
Hi,
I've updated my project with jqgrid from version 3.6.4 to 3.7.2 (got the same problem with 3.7.1) and got the following problem:
The grid appears but without any data
Do I need to modify something?
The returned json content is:
Is this code still valid for jqgrid?
Thanks for your time!
Renaud
19:46
23/11/2009
UPDATE
I've found some info: http://www.trirand.com/jqgridw.....4_to_3.6.5
I've made de modification and still not work 🙁
20:40
10/08/2009
You have wrong JSON data. Correspond to http://www.json.org/ the strings must be quoted (with " and not with '). You can verify you test JSON data on http://www.jsonlint.com/. An old version of jQuery (1.3.x) and not jqGrid allowed to use incorrect quoting (allowed to use ').
By the way in the first entry there are one more syntax error
['2','product0','300,00 €,'2010-08-18 18:38:36','processed']
you wanted probably
['2','product0','300,00 €','2010-08-18 18:38:36','processed']
(one ' after €). The correct data should looks like following
{"page": 1,"total": 1,"rows": [
{"id": "2", "cell": ["2","product0","300,00 €","2010-08-18 18: 38: 36","processed"]},
{"id": "23″,"cell": ["000023","Product1","100,00 €","2010-09-07 15: 16: 14","processed"]},
{"id": "19″,"cell": ["19","Product2","400,00 €","2010-09-01 18: 08: 12","processed"]}
]}
So you use just replace your server code to produce " instead of '. I don't recommend in general use manual encoding of JSON strings. There are good JSON serializer depend on the language and technology which you use on the server. For example if the string which you want to serialize has already " symbol it must be escaped (replaced to "). in http://www.json.org/ described much more such examples.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
53 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