jQuery UI Widgets Forums Grid jqxPivotGrid Error :t.jqx.getByPriority is not a function

This topic contains 1 reply, has 2 voices, and was last updated by  Todor 3 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Vrushali
    Participant

    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
                    });
    

    Todor
    Participant

    Hello Vrushali,

    I’ve tested your code with template data and it’s working. You could review it in this example. Please check your json data if everything is fine.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.