We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

property 'From' of undefined

Hey Guys,

i´m trying to get the PivotGrid to work but i get this error:

ej.web.all.js:281425 Uncaught TypeError: Cannot read property 'From' of undefined


here a snippet from the code:

var pivot_dataset = [
        { Amount: 100, Country: "Canada", Date: "FY 2005", Product: "Bike", Quantity: 2, State: "Alberta" },
        { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Van", Quantity: 3, State: "British Columbia" },
        { Amount: 300, Country: "Canada", Date: "FY 2007", Product: "Car", Quantity: 4, State: "Brunswick" },
        { Amount: 150, Country: "Canada", Date: "FY 2008", Product: "Bike", Quantity: 3, State: "Manitoba" },
        { Amount: 200, Country: "Canada", Date: "FY 2006", Product: "Car", Quantity: 4, State: "Ontario" }
    ];

    $(function () {
        $("#PivotGrid").ejPivotGrid({
            dataSource: {
                data: pivot_dataset,
                rows: [
                    {
                        fieldName: "Country",
                        fieldCaption: "Country",
                    },
                    {
                        fieldName: "State",
                        fieldCaption: "State",  
                    }
                ],
                columns: [

                    {
                        fieldName: "Product",
                        fieldCaption: "Product",
                    }
                ],
                values: [
                    {
                        fieldName: "Amount",
                        fieldCaption: "Amount",
                    },
                    {
                        fieldName: "Quantity",
                        fieldCaption: "Quantity",
                    }
                ]
            }
        });
    });

Thank you in advance for your help.

Greetings

R.I

2 Replies

RI RI January 27, 2016 11:34 AM UTC

OK, got it.

There was an OrderBy in linq syntax but i didnt include the jquery.linq.js file


RG Ramesh Govindaraj Syncfusion Team January 28, 2016 08:48 AM UTC

Hi Ruzic,

Thank you for using Syncfusion products.

Please let us know if you have any query.

Regards,
Ramesh G.

Loader.
Up arrow icon