Keep receiving the following error Cast not valid when switching values
OrderStyle is an enum with 3 values
public enum OrderStyle {Simple,Fast,Slow}
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Specified cast is not valid.
System.InvalidCastException: Specified cast is not valid.
at Radzen.DropDownBase1[T].SelectItem (System.Object item, System.Boolean raiseChange) <0x39f0980 + 0x0024a> in <filename unknown>:0 at Radzen.Blazor.RadzenDropDown
1[TValue].OnSelectItem (System.Object item) <0x3dd46e0 + 0x001a2> in :0
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x3dd5a90 + 0x000da> in :0
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask (System.Threading.Tasks.Task taskToHandle) <0x3818ba0 + 0x000b6> in :0
<RadzenDropDown Data="Enum.GetNames(typeof(OrderStyle)).ToList()" @bind-
Value="myOrder.OrderStyle" SelectedItem="OrderStyle.NEUTRAL" />
@* @bind-Value="clientOrder.OrderStyle" SelectedItemChanged="(args=> ChangeOrderStyle(args))"
What's the correct approach for a drop down with enums, that you want associated to the new object (i.e. if you were creating a new order)