I'm getting an error when I click on an item in the DropDownDataGrid.
The error is: System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'Modelo.PesadaEntrada'
The stck trace is:
at **Radzen.DropDownBase1.SelectItem**(Object item, Boolean raiseChange) at Radzen.Blazor.RadzenDropDownDataGrid
1.OnRowSelect(Object item)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Radzen.Blazor.RadzenDataGrid1.OnRowSelect(TItem item, Boolean raiseChange) at Radzen.Blazor.RadzenDataGrid
1.OnRowClick(DataGridRowMouseEventArgs1 args) at Radzen.Blazor.RadzenDataGridCell
1.OnClick(MouseEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
The error is thrown in the line:
await ValueChanged.InvokeAsync(object.Equals(internalValue, null) ? default(T) : (T)internalValue)
because of internalValue is an int and T is 'PesadaEntrada'
how can I change the Value of the internalValue to set a 'PesadaEntrada' or a null Value???
Thanks in advance