New to Telerik UI for Blazor? Start a free 30-day trial
TelerikBlazor.getWindowWidth Was Undefined
Updated on Oct 8, 2026
Environment
| Product | UI for Blazor |
| Version | 15.0.0 and above |
Description
An issue can occur when upgrading Telerik UI for Blazor from version 14- to 15+. The problem manifests as a JavaScript error at runtime that is similar to:
Unhandled exception rendering component: Could not find 'TelerikBlazor.getWindowWidth' ('getWindowWidth' was undefined).
or
Microsoft.JSInterop.JSException: The value 'TelerikBlazor.getWindowWidth' is not a function.
Cause
getWindowWidth is a new JavaScript function in telerik-blazor.js in Telerik UI for Blazor version 15.0.0. If there is an error about it missing, this means that the app is loading an outdated version of the telerik-blazor.js file, due to:
- Browser cache
- Incorrect CDN file URL
- Outdated local file in
wwwroot
Solution
Depending on the above cause:
- Clear the browser cache and see how to avoid browser caching issues during component version upgrades.
- Replace the CDN file URL.
- Replace the local file in
wwwroot.