Column Visible Property on Data Grid Bound to Global Variable Not Working

Hello all,

I have a switch component that is bound to global boolean variable and calls the page load event on change. I have a column visible property in a datagrid on that same page that is bound to the same global variable. So, when the switch is activated it should reveal the column and hide it when the switch is deactivated.

I have filters on boolean columns that are tied to the same global variable and work as expected when the page reloads, but when I try and bind the column visible property to the same boolean variable I get the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Radzen.Blazor.RadzenDataGrid`1.UpdatePickableColumn(RadzenDataGridColumn`1 column, Boolean visible)
   at Radzen.Blazor.RadzenDataGridColumn`1.SetParametersAsync(ParameterView parameters)

I have utilized this same method on an application made on an older version of Radzen, so I am curious if this is a bug. Of course, I may be overlooking something and do not understand the error.

Any help would be appreciated.

Thanks,

Zach

hello this issue exist on the latest version...

Hey @John_Oliver_Parayo,

Here is the fix for the issue in this thread made several months ago:

Let us know how to reproduce it in the latest version.

i have develop the page with dynamic columns few months before and while im updating the page it works if i run it to the radzen or visual studio itself it works fine and when i am deploying the application they i got the error.i tried downgrading the radzen and publish using VS still get the same error.. It works when i make the Column Static example the Header title is hard coded works without any issue...

We will need example code that we can run and reproduce this exception.