I have a Blazor page where I have Master Detail Datagrids. According to selected row in master I need to change visibility of two columns in Detail DataGrid. I tried Visible property to set dynamically, then I tried keep the structure and changed the context by Template. The page works after Initialize till should be changed visibility of columns. Then it crashed with:
WebViewIpcReceiver.ts:32 The ParameterView instance can no longer be read because it has expired. ParameterView can only be read synchronously and must not be stored for later use.
at Microsoft.AspNetCore.Components.ParameterView.GetEnumerator()
at Microsoft.AspNetCore.Components.ParameterView.TryGetValue[TValue](String parameterName, TValue& result)
at Radzen.ParameterViewExtensions.DidParameterChange[T](ParameterView parameters, String parameterName, T parameterValue)
at Radzen.Blazor.RadzenDataGridColumn`1.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState).
My piece of Blazor code is like
<RadzenDataGridColumn TItem="Diel" Property="Ns_cpa" Title="k parc." Width="30%" TextAlign="TextAlign.Center" HeaderCssClass="rz-background-color-info-lighter" Visible=@(!isSkupina20)>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="Diel" Property="Ds_cpa" Title="od parc." Width="30%" TextAlign="TextAlign.Center" HeaderCssClass="rz-background-color-info-lighter" Visible=@(isSkupina20)>
</RadzenDataGridColumn>
@* <RadzenDataGridColumn TItem="Diel" Title="@(isSkupina20 ? "od parc." : "k parc.")" Width="30%" TextAlign="TextAlign.Center" HeaderCssClass="rz-background-color-info-lighter" >
<Template Context="diel">
@if (isSkupina20)
{
<span>@diel.Ds_cpa</span>
}
else
{
<span>@diel.Ns_cpa</span>
}
</Template>
</RadzenDataGridColumn> *@