Ticket T812862
Visible to All Users

Could not find 'DxBlazorLoaded' in 'window'.

created 5 years ago

So I have been able to narrow down a bug that started with a the .net core preview 9 update. I have already updated to the latest prerelease version of devexpress.blazor. The issue is that I cannot update the a child component's DxDataGrid from a parameter in the parent. It displays the first list, but it then fails with:

Microsoft.JSInterop.JSException: Could not find 'DxBlazorLoaded' in 'window'.
Error: Could not find 'DxBlazorLoaded' in 'window'.
    at https://localhost:44360/_framework/blazor.server.js:8:28065
    at Array.forEach (<anonymous>)
    at p (https://localhost:44360/_framework/blazor.server.js:8:28026)
    at https://localhost:44360/_framework/blazor.server.js:8:28733
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:44360/_framework/blazor.server.js:8:28707)
    at https://localhost:44360/_framework/blazor.server.js:1:19148
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:44360/_framework/blazor.server.js:1:19119)
    at e.processIncomingData (https://localhost:44360/_framework/blazor.server.js:1:17165)
   at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
   at DevExpress.Blazor.Base.DxComponentBase.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: Could not find 'DxBlazorLoaded' in 'window'.
Error: Could not find 'DxBlazorLoaded' in 'window'.
    at https://localhost:44360/_framework/blazor.server.js:8:28065
    at Array.forEach (<anonymous>)
    at p (https://localhost:44360/_framework/blazor.server.js:8:28026)
    at https://localhost:44360/_framework/blazor.server.js:8:28733
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:44360/_framework/blazor.server.js:8:28707)
    at https://localhost:44360/_framework/blazor.server.js:1:19148
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:44360/_framework/blazor.server.js:1:19119)
    at e.processIncomingData (https://localhost:44360/_framework/blazor.server.js:1:17165)

Any ideas?

Answers approved by DevExpress Support

created 5 years ago

Hi,

It seems to be a common error related to static files. Please review the Could not find 'X' in 'window.DxBlazor' item of the Troubleshooting paragraph in our README.MD file.
If it is not your case, please send me a sample project or a code of your page where the grid is used so I can reproduce this issue on my side and provide you with a solution. I look forward to your response.

    Comments (1)

      Thanks, I added the link to dx-blazor.css and dx-blazor.js to the _Host.cshtml file and it started working.

      For other's reference, you can find this discussion here:
      https://stackoverflow.com/questions/57593583/i-have-a-formlayout-error-when-running-a-blazor-website

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.