Forum


01:50

02/09/2009

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?
06:42

I think you want the JSON dot notation.
You can find an example here: http://www.trirand.com/jqgridw.....eving_data
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66