jQuery UI Widgets › Forums › Plugins › Data Adapter › selected columns
Tagged: angular dataadapter, bootstrap dataadapter, dataadapter, javascript dataadapter, jquery dataadapter, jqwidgets dataadapter
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 8 years, 10 months ago.
Hi,
Is there a way where I can get selected columns only from a source? Say I want to get columns A and B only.
var data = '{"A":1899466,"B":"XDSF","C":EWWWWE,"D":"WERE","DATETIME":"2016-01-12 06:30:36","E":"YODA"}' var source = { datatype: "json", datafields: [ { name: 'A'}, { name: 'B'} ], localdata: JSON.parse(data) }; var dataAdapter= new $.jqx.dataAdapter(source, { loadComplete: function(records) { console.log(records); } });
Thanks!
Hello ziggy,
var data = '{"A":1899466,"B":"XDSF","C":"EWWWWE","D":"WERE","DATETIME":"2016-01-12 06:30:36","E":"YODA"}' var source = { datatype: "json", datafields: [ { name: 'A', type: 'number' }, { name: 'B', type: 'string' } ], localdata: JSON.parse(data) }; var dataAdapter = new $.jqx.dataAdapter(source, { autoBind: true, beforeLoadComplete: function (records) { console.log(records); return records; } });
Best Regards, Hristo Hristov
jQWidgets team http://www.jqwidgets.com
You must be logged in to reply to this topic.