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
Help with jsonmap in colModel (I think)
14/08/2012
20:34
Avatar
erich93063
Member
Members
Forum Posts: 14
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

Ok So I have a JSON response of:

{ "PAGE" : 1.0,

"RECORDS" : 1.0,

"ROWS" : [ [ 2410641,

"PUB JOB TITLE",

"Employee",

"Full Time",

"MY JOB REQUIREMENTS",

"PLEASE CONTACT ME AT xxx. TODAY!",

"Jill.xxx@xxx.com",

"MY JOB DESCRIPTION",

"August, 13 2012 12:58:29",

"Clinical Research",

"Colorado-Grand Junction^Colorado-Denver",

"Chester",

15.0,

"JANITOR^Biometrics^Biostatistics",

"47,53",

0.0

] ],

"TOTAL" : 1.0

}

My problem is that my grid will not be displaying ALL of these fields. I am displaying the first 4, but then I'm not displaying any more until the 9th item. So how in my column model do I tell my 5th item to actually display the NINTH item in the JSON? Here is my current colModel:

colModel :[

{name:'OrderID',index:'o.orderID', sorttype:'int', title:false},

{name:'JobTitle',index:'o.WebJobTitle', sorttype:'string', title:false},

{name:'JobType',index:'o.webJobType', sorttype:'string', title:false},

{name:'JobStatus',index:'o.webJobStatus', sorttype:'string', title:false},

{name:'UpdatedOn',index:'o.UpdateDate', sorttype:'date', title:false, jsonmap:8}

]

This is where I am assuming I need to use jsonmap to map to a value further in the array but not sure how.

THANKS

14/08/2012
20:42
Avatar
erich93063
Member
Members
Forum Posts: 14
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

Sorry just figured it out. I need to add  repeatitems: false to my jsonReader tehn I can just use jsonmap:8.

14/08/2012
20:45
Avatar
erich93063
Member
Members
Forum Posts: 14
Member Since:
20/10/2009
sp_UserOfflineSmall Offline

OK Still have a problem. I am now using:

colModel :[

{name:'orderID',index:'o.orderID', sorttype:'int', title:false, jsonmap:0},

{name:'jobTitle',index:'o.WebJobTitle', sorttype:'string', title:false, jsonmap:1},

{name:'jobType',index:'o.webJobType', sorttype:'string', title:false, jsonmap:2},

{name:'jobStatus',index:'o.webJobStatus', sorttype:'string', title:false, jsonmap:3},

{name:'updatedOn',index:'o.UpdateDate', sorttype:'date', title:false, jsonmap:8}

]

But my first item (Order ID) is not displaying for some reason. Is jsonmap:0 not correct ????

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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