I am trying to use RadzenDatePicker inside a RadzenDataGridColumn
. When I select a date I get the following error message:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Specified cast is not valid.
I am using a DateOnly
property.
This is the code
<RadzenDataGridColumn TItem="SubscriptionResponse" Property="Name" Title="Name" Width="100px" Frozen="true">
<EditTemplate Context="subscriptionResponse">
<RadzenTextBox @bind-Value="subscriptionResponse.Name" Style="width:200px; display: block" Name="SubscriptionName"/>
</EditTemplate>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="SubscriptionResponse" Property="StartDate" Title="Start Date" Width="160px">
<Template Context="subscriptionResponse">
@subscriptionResponse.StartDate
</Template>
<EditTemplate Context="subscriptionResponse">
<RadzenDatePicker
@bind-Value="subscriptionResponse.StartDate"
Style="width: 100%">
</RadzenDatePicker>
</EditTemplate>
</RadzenDataGridColumn>