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_TopicIcon
How to make jqGrid show nested json objects
02/09/2009
01:50
Avatar
haroon84
New Member
Members
Forum Posts: 1
Member Since:
02/09/2009
sp_UserOfflineSmall Offline

Hi guys,

Well I've got a JSON object list being returned from a webservice...one object of the array looks something like this:

{
    "Title":"New Event","Sites":null,
    "Location":"Islamabad",
    "Description":"",
    "Cause":{"Name":"Test Cause 21","Description":"Testing"},
}

As you can see, there is a nested json object inside it (Cause)...now I would like to see a column 'Cause' in the grid which shows the name of the cause only...I've defined the the column model like this:

colModel:

[
                    { name: 'Id', index: 'Id', width: 60 },
                    { name: 'Cause.Name', index: 'Cause.Name', width: 60 },
                    { name: 'Title', index: 'Title', width: 90},

]

but the Cause column shows up empty...any idea on how I can get this to work properly?

02/09/2009
06:42
Avatar
Lotte-Sara Laan
Guest
Guests

I think you want the JSON dot notation.

You can find an example here: http://www.trirand.com/jqgridw.....eving_data

Search for "JSON dot notation" on that page (-;

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
38 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