cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Exception raised when using Telerik Kendo UI components in PowerBI's visualsandbox

 

Attempting to use an external UI library (Telerik Kendo UI) and receiving the following exception:

 

--

Uncaught TypeError: Illegal invocation
at <anonymous>:562:21817
at <anonymous>:562:27218
at <anonymous>:563:18554
at <anonymous>:563:18651
at t.kendo.t.kendo.cultures (<anonymous>:562:21)
at Window.<anonymous> (<anonymous>:562:59)
at <anonymous>:841:20
at Object.r [as injectJsCode] (visualhostcore.min.js:2)
at i.loadWithoutResourcePackage (visualsandbox.min.js:1)
at i.executeMessage (visualsandbox.min.js:1)

--

 

A compatible version of jquery is loaded and initialised before the Telerik component js.  A repoduction is available here:

 

https://github.com/whileoneloop/kendo-ui-power-bi-visual

 

An issue has been posted in the PowerBI-visuals git repo:

 

https://github.com/Microsoft/PowerBI-visuals/issues/239

 

Have also sent a support ticket to Telerik.

 

Has anyone been able to load Kendoui in the PowerBI sandbox?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Exception raised when using Telerik Kendo UI components in PowerBI's visualsandbox

You have to include these code into your code:

Object.defineProperties(window, {
    'devicePixelRatio': {
        get: function () {
            return window.window.devicePixelRatio;
        }
    },
    'innerWidth': {
        get: function () {
            return window.window.innerWidth;
        }
    }
});

var kendo = { cultures: {} };
window.kendo = kendo;
window.window.kendo = kendo;

Please take a look at this pull request.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Exception raised when using Telerik Kendo UI components in PowerBI's visualsandbox

You have to include these code into your code:

Object.defineProperties(window, {
    'devicePixelRatio': {
        get: function () {
            return window.window.devicePixelRatio;
        }
    },
    'innerWidth': {
        get: function () {
            return window.window.innerWidth;
        }
    }
});

var kendo = { cultures: {} };
window.kendo = kendo;
window.window.kendo = kendo;

Please take a look at this pull request.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

Highlighted
Frequent Visitor

Re: Exception raised when using Telerik Kendo UI components in PowerBI's visualsandbox

This no longer works when upgrading api from 1.7.0 to 2.3.0 or 2.5.0.

it seems the 2 properies are no longer need but later and issue is faced where code this.kendo.util  throws TypeError: Cannot read property 'util' of undefined.  In running their samples this refers to window object so not clear why this is failing due to pbiviz api update.  

 

Anyone know how to resolve this ?

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.