This is a migrated thread and some comments may be shown as answers.

setDatasource method does not working

3 Answers 142 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Enes
Top achievements
Rank 1
Enes asked on 17 Apr 2020, 07:17 AM
When I try to run the a function, the grid does not detect this and gives an error.

3 Answers, 1 is accepted

Sort by
0
Accepted
Preslav
Telerik team
answered on 20 Apr 2020, 08:41 AM

Hi Enes,

I tested the scenario, and unfortunately, I am not able to replicate the problem on my side. You can find my test page here - https://dojo.telerik.com/itejemap

Having said that, could you please elaborate on your implementation?

 

Regards,
Preslav
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Enes
Top achievements
Rank 1
answered on 20 Apr 2020, 12:36 PM

Thank for answering.But; altough given your test page is okey, https://docs.telerik.com/kendo-ui/api/javascript/ui/pivotgrid/methods/setdatasource in this page setdatasource method still doesn't work. I think; when create a new datasource,the new keyword is missing.

 

Also; I have another question about KendoPivotConfiguration. I am trying to apply kendo pivot configuration to set a datasource but doesn't happen. Moreover;  i put new keyword to kendo.data.PivotDataSource:

 

https://docs.telerik.com/kendo-ui/api/javascript/ui/pivotconfigurator/methods/setdatasource.

0
Accepted
Preslav
Telerik team
answered on 22 Apr 2020, 11:57 AM

Hello Enes,

You are correct, indeed the "new" keyword is missing in the API example. 

Further, about the PivotConfigurator, in that example, not only the "new" keyword is missing, the configuration is wrong, we should remove the following lines:

var dataSource = new kendo.data.PivotDataSource({
    dataSource: {
        type: "xmla",
        columns: [{ name: "[Date].[Calendar]", expand: true }],
        rows: [{ name: "[Product].[Product]" }],
        measures: ["[Measures].[Internet Sales Amount]"],
        transport: {
            connection: {
                catalog: "Adventure Works DW 2008R2",
                cube: "Adventure Works"
            },
            discover: {
                url: "https://demos.telerik.com/olap/msmdpump.dll",
                dataType: "text",
                contentType: "text/xml",
                type: "POST"
            }
        },
        schema: {
            type: "xmla"
        }
    }
});

For example, check this Dojo: https://dojo.telerik.com/AgEvotEj

Having said that, thank you for pointing the above problems. I will update the examples in the Docs so they do not throw errors.

 

Regards,
Preslav
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
PivotGrid
Asked by
Enes
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Enes
Top achievements
Rank 1
Share this question
or