Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Problem updating 3.6.4 to 3.7.1 or 3.7.2
07/09/2010
19:07
Avatar
rreennaauudd
Member
Members
Forum Posts: 6
Member Since:
23/11/2009
sp_UserOfflineSmall Offline

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:
 

{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']}]}

Is this code still valid for jqgrid?

Thanks for your time!

Renaud

07/09/2010
19:46
Avatar
rreennaauudd
Member
Members
Forum Posts: 6
Member Since:
23/11/2009
sp_UserOfflineSmall Offline

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 🙁

07/09/2010
20:40
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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 

07/09/2010
21:14
Avatar
rreennaauudd
Member
Members
Forum Posts: 6
Member Since:
23/11/2009
sp_UserOfflineSmall Offline

Great, it's ok now. Thanks!

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information