How do I load this data using datatype json adapter?
Using your sample datatable example
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatatable/index.htm#demos/jqxdatatable/javascript-datatable-rows-rendering.htm
[
{
laptops:
[
{ img: ‘../../images/l-13.jpg’, ram: ‘8GB DD3’, cpu: ‘Intel Core i7-3720QM’, price: 2999, display: 15.4, hdd: ‘512GB SSD’, model: ‘Apple MacBook Pro’ },
{ img: ‘../../images/l-14.jpg’, ram: ‘8GB DD3’, cpu: ‘Intel Core i7-3667U’, price: 1299, display: 13.3, hdd: ‘256GB SSD’, model: ‘Apple MacBook Air’ },
{ img: ‘../../images/l-15.jpg’, ram: ‘8GB DD3’, cpu: ‘Intel Core i7-3632QM’, price: 2199, display: 15.4, hdd: ‘256GB SSD’, model: ‘Asus ZenBook UX51VZ’ }
]
}
]
var ptsource = {
dataType: “json”,
dataFields: [
{name: ‘laptops’, type: ‘string’}, ???????
{name: ‘img’, type: ‘string’},
{name: ‘ram’, type: ‘string’},
{name: ‘cpu’, type: ‘string’},
{name: ‘price’, type: ‘number’},
{name: ‘display’, type: ‘string’},
{name: ‘hdd’, type: ‘string’},
{name: ‘model’, type: ‘string’}
],
data: {qtable: ‘productxx’},
url: ‘typexxx.php’
};
var ptdataAdapter = new $.jqx.dataAdapter(ptsource);
Any assistance will be greatly appreciated.