Hello,
I am trying to load simple jqxpivotgrid example using my own data. I am getting an error as ‘Uncaught Databinding exception: t.jqx.getByPriority is not a function.
Could you please help?
var source =
{
localdata: results,
datatype: "json",
datafields:
[
{ name: 'Hour', type: 'string' },
{ name: 'Date', type: 'string' },
{ name: 'REC_COUNT', type: 'number' }
]
};
var dataAdapter = new $.jqx.dataAdapter(source);
dataAdapter.dataBind();
// create a pivot data source
var pivotDataSource = new $.jqx.pivot(
dataAdapter,
{
pivotValuesOnRows: false,
rows: [{ dataField: 'Date' }],
columns: [{ dataField: 'Hour'}],
values: [
{ dataField: 'REC_COUNT', 'function': 'sum', text: 'sum' },
{ dataField: 'REC_COUNT', 'function': 'count', text: 'count' },
]
});
// create a pivot grid
$('#divPivotGrid').jqxPivotGrid(
{
source: pivotDataSource,
treeStyleRows: false,
selectionEnabled: true
});