jQuery UI Widgets › Forums › Plugins › Data Adapter › Object Properties with sub property
Tagged: dataadapter, javascript dataadapter, jquery dataadapter, jqwidgets dataadapter, multiple properties
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 5 months ago.
I am trying to bind to an array as my source with the objects properties as such:
var source ={ datatype: "array", datafields: [{ name: 'Name', type: 'string' }, { name: 'Role', type: 'string' }, { name: 'Contact.WorkEMail', type: 'string' }, { name: 'Contact.WorkPhone', type: 'string' }, { name: 'Contact.Office', type: 'string' }], localdata: duties };
However my grid only displays the Name and Role. Is it possible to define the data fields and columns with this format?
Hello beruken,
You could achieve this as you use map field in the desired “datafield”. I would like to suggest you look at this forum topic: http://www.jqwidgets.com/community/topic/mapping-each-value-of-array-to-each-datafield/#post-53735
map
Best Regards, Hristo Hristov
jQWidgets team http://www.jqwidgets.com
You must be logged in to reply to this topic.