# Bug: Exception when resizing a column of a RadzenDataGrid

**URL:** <https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131>\
**Category:** Radzen.Blazor Components\
**Created:** [September 6, 2023, 6:45pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131 "2023-09-06T18:45:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pickymartin](https://forum.radzen.com/user_avatar/forum.radzen.com/pickymartin/32/15522_2.png) [@pickymartin](https://forum.radzen.com/u/pickymartin)\
**Post date:** [September 6, 2023, 6:45pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/1 "2023-09-06T18:45:14Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![marekm294](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/74df32/32.png) [@marekm294](https://forum.radzen.com/u/marekm294)\
**Post date:** [September 6, 2023, 6:47pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/2 "2023-09-06T18:47:10Z")

</div>

[Radzen nuget update new error appeared - SOLVED - Radzen.Blazor Components - Radzen](http://forum.radzen.com/t/radzen-nuget-update-new-error-appeared-solved/15028)

---

<div class="post-metadata">

**Author:** ![aavijeh](https://forum.radzen.com/letter_avatar_proxy/v4/letter/a/898d66/32.png) [@aavijeh](https://forum.radzen.com/u/aavijeh)\
**Post date:** [September 7, 2023, 5:06pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/3 "2023-09-07T17:06:55Z")

</div>

Same problem happened after upgrading for Radzen DataGrid

---

<div class="post-metadata">

**Author:** ![pickymartin](https://forum.radzen.com/user_avatar/forum.radzen.com/pickymartin/32/15522_2.png) [@pickymartin](https://forum.radzen.com/u/pickymartin)\
**Post date:** [September 22, 2023, 6:12pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/4 "2023-09-22T18:12:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [September 23, 2023, 6:49am UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/5 "2023-09-23T06:49:58Z")

</div>

> [@pickymartin](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![pickymartin](https://forum.radzen.com/user_avatar/forum.radzen.com/pickymartin/32/15522_2.png) [@pickymartin](https://forum.radzen.com/u/pickymartin)\
**Post date:** [September 25, 2023, 8:21pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/6 "2023-09-25T20:21:55Z")

</div>

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

> **[GitHub - radzenhq/radzen-blazor: Radzen Blazor is a set of 70+ free native...](https://github.com/radzenhq/radzen-blazor#4-include-radzenblazorjs)**
>
> Radzen Blazor is a set of 70+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI. - GitHub - radzenhq/radzen-blazor: ...

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.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [September 26, 2023, 4:07am UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/7 "2023-09-26T04:07:51Z")

</div>

You have probably missed the [getting started instructions](https://blazor.radzen.com/get-started) 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.

---

<div class="post-metadata">

**Author:** ![TK-421](https://forum.radzen.com/user_avatar/forum.radzen.com/tk-421/32/7900_2.png) [@TK-421](https://forum.radzen.com/u/TK-421)\
**Post date:** [October 30, 2023, 7:14pm UTC](https://forum.radzen.com/t/bug-exception-when-resizing-a-column-of-a-radzendatagrid/15131/8 "2023-10-30T19:14:03Z")

</div>

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.
