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
How to get handle to an entire json row to manipulate data in custom cell renderers
11/08/2011
19:13
Avatar
dmanchikalapudi
United States
New Member
Members
Forum Posts: 2
Member Since:
10/08/2011
sp_UserOfflineSmall Offline

I have a list of objects being returned from server. Lets say I have 10 attributes within that object. 

and my column model looks like this :

colModel: [

{name:'datePosted', width:100, formatter:'date', formatoptions: {newformat: 'M-d-Y'}, align:"center"},

  {name:'totalActivityEarning', align:"center"}   ,

  {name:'description', width:350, align:"center"},

  {name:'activityType', width:100, align:"center"}

]

I want to do something within the onSelectRow event on the grid to manipulate some information to render some additional information in a sub grid. I would like to get a handle to the row (one that has all of the information ... not just the above 4 fields). Currently, I am getting the row handle currently like this :

$("<id of the grid container>").getRowData(<id of the row>)

This only gives me an object that contains the 4 columns I defined in the grid. Does anyone have any idea how to get the complete JSON object ?

--DK.

11/08/2011
19:34
Avatar
dmanchikalapudi
United States
New Member
Members
Forum Posts: 2
Member Since:
10/08/2011
sp_UserOfflineSmall Offline

Nevermind. I found the answer:

I had to use 

$("<id of your grid>").getGridParam("userData"); --> NOTE its userData not userdata

and in your json reader, 

userdata: "<name of the list of object you are sending back as json response>" --> again note its userdata not userData

This will give you an array of rows ...each containing all the information you sent across... not just the column model you define for the grid.

--DK.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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