Hi all!
I’m sure it’s quite simple issue, but I can’t get it working…
I have such a JSON object:
{
“Id”: 1,
“Name”: “Blablabla”,
“ABC”: {
“A”: 5,
“B”: 6,
“C”: 7,
}
}
and I want it to my jqxGrid.
There is no problems with binding properties like Id or Name:
var source =
{
datatype: “json”,
datafields: [
{ name: ‘Id’, type: ‘int’ },
{ name: ‘Name’, type: ‘string’ }
],
localdata: data
};
var dataAdapter = new $.jqx.dataAdapter(source);
$(‘div’).jqxGrid(
{
width: ‘100%’,
source: dataAdapter,
columnsresize: false,
columns: [
{ text: ‘Id’, datafield: ‘Id’, width: ‘50%’ },
{ text: ‘Name’, datafield: ‘Name’, width: ’50’ }
]
but how can I make a column for ABC.A or ABC.B?
I always have empty data inside (I’ve tried ABC.A, ABC[0], ABC.0.A and etc…)
Seems like I should set some extra properties for datafields or etc…
Thank you in advance!