Bug: Exception when resizing a column of a RadzenDataGrid

When resizing a RadzenDataGrid column, the following exception was thrown:

Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'parentNode')
TypeError: Cannot read properties of null (reading 'parentNode')
    at Object.startColumnResize (https://localhost/bcehs.aims.ui/js/Radzen.Blazor/Radzen.Blazor.js:1533:21)
    at https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:3501
    at new Promise (<anonymous>)
    at kt.beginInvokeJSFromDotNet (https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:3475)
    at https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:72077
    at Array.forEach (<anonymous>)
    at kt._invokeClientMethod (https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:72063)
    at kt._processIncomingData (https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:70105)
    at connection.onreceive (https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:64508)
    at yt._poll (https://localhost/bcehs.aims.ui/_framework/blazor.server.js:1:44171)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at Radzen.Blazor.RadzenDataGrid`1.StartColumnResize(MouseEventArgs args, Int32 columnIndex)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
  • This issue was observed after upgrading Radzen.Blazor NuGet from version 4.12.0 to 4.15.8
  • Have tried upgrading to the latest version 4.15.10; however, the issue persists.
  • Currently downgrade to version 4.15.1 to bypass this issue. So the issue could be introduced between version 4.15.2 and 4.15.8 (inclusively).

Thank you for your review and investigation.

1 Like

Radzen nuget update new error appeared - SOLVED - Radzen.Blazor Components - Radzen

Same problem happened after upgrading for Radzen DataGrid

It turned out Radzen.Blazor.js is not automatically updated when changing Radzen.Blazor NuGet version.

The issue is resolved once I update my solution with the corresponding files from the staticwebassets folder.

Wonder if Radzen.Blazor NuGet should include an installation script so the staticwebassets are automatically copied to the solution?

This is done automatically if you use the embedded assets from _content/Radzen.Blazor/ as in the getting started instructions. During publish those are copied to the wwwroot directory. This is how every Radzen Blazor Studio application is setup and how the online demos work.

Yes I followed the instruction below when I added RadZen.Blazor NuGet to my application for the first time:

However, adding RadZen.Blazor NuGet to the application didn't automatically add the resource files to the application (i.e. .css and .js files), so I had to manually copy the files to my application.

When I later needed to update RadZen.Blazor NuGet to a newer version. I forgot that I need to manually update the static files.

My question is whether it's possible to include an installation script with the NuGet, so the asset files would be automatically copied to the application. This would help eliminate the process to manually update the static files.

You have probably missed the getting started instructions which tell how to properly include the JS and CSS assets. If you do this they will be updated automatically.

There is no way to have an installation script do it.

fyi, I ran into this today. ctrl-f5 fixed it for me (force browser refresh). it's probably the case for others as well, perhaps a cache busting mechanism.