I have a DataGrid where I want to show the Edit column (as an example) only when the page is in "edit" mode. For this, I have a variable that I watch.
A very simplified version:
<RadzenGrid AllowFiltering="false" AllowPaging="true" AllowSorting="true" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
Data="@projectBuyouts" TItem="Buyout" @ref="projectBuyoutGrid">
<Columns>
<RadzenGridColumn TItem="Buyout" Property="Name" Title="Name" Width="130px">
</RadzenGridColumn>
<RadzenGridColumn TItem="Buyout" Title="Sum" Width="50px" TextAlign="TextAlign.Right">
</RadzenGridColumn>
@if (AllowEdit)
{
<RadzenGridColumn TItem="Buyout" Title="Edit" Bubble="false" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="64px">
</RadzenGridColumn>
}
</Columns>
</RadzenGrid>
As you can see, the Edit column should disappear when AllowEdit is false. And it does. However, every time I toggle the value, another Edit column gets added.
What am I overlooking here please?
