I would like to have a filter that is an enum, and then I would like to assign this value to an int. This is important because it passes filters to the API, and I cannot send the enum type. Is this possible? Below I will paste the code with my attempts to solve the problem
<RadzenDataGridColumn TItem="TraderData" Property="@nameof(TraderData.StatusId)" Title="Status">
<Template Context="TraderData">
@String.Format(((TraderStatuses)TraderData.StatusId).GetDisplayDescription())
</Template>
<FilterValueTemplate>
<RadzenDropDown class="mt-1 mb-1" @bind-Value=@selectedStatusFilter Data=@(Enum.GetValues(typeof(TraderStatuses)).Cast<Enum>()) Style="width: 100%; max-width: 400px;" Name="DropDownBindValue">
<Template Context=displayOptionsContext>
@if (displayOptionsContext.ToString() != "0")
{
@(((TraderStatuses)displayOptionsContext).GetDisplayDescription())
}
</Template>
<ValueTemplate Context="displaySelectedContext">
@if (displaySelectedContext.ToString() == "0")
{
@("Select option")
}
else
{
@(((TraderStatuses)displaySelectedContext).GetDisplayDescription())
}
</ValueTemplate>
</RadzenDropDown>
</FilterValueTemplate>
</RadzenDataGridColumn>