| Page 1 of 1 | [ 3 posts ] |
|
I have a XHRDataSource that uses JSON as the response type and with responseSchema that has 6 fields.
My DataTable will only have 4 columns, but for one of the columns, I want to use 3 of the properties from the returned JSON object. Any suggestions on going about this? I would rather keep the existing JSON responseSchema, if possible. |
|
That is fine, the number of fields in the responseSchema and those in the column definitions don't need to match, that is why you have to provide those same names twice, they are not the same.
In your custom formatter you can use the Record object to fetch the value of any of the other fields by name using method getData: oRecord.getData('otherField'); The fields will show up by the name they were given in the responseSchema. |
|
Thank you Satyam!
Your suggestion is what I was looking for and it works for me. |
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group