Is there an example of RadzenDropDown on a numeric like a decimal? I have a list of line numbers (decimal) which come form a database. I have similar DDLs for strings and even months pre-mapped to integers for the ordering. However these numbers come from the database and cannot be pre-mapped. The only example that was sort of close took a range and mapped to strings like “ID x, Name X”.
The first DropDown example can be updated to use any type of value:
@inherits DbContextPage
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="0.5rem" class="rz-p-sm-12">
<RadzenLabel Text="Select Value" Component="DropDownBindValue" />
<RadzenDropDown @bind-Value=@value Data=@data Style="width: 100%; max-width: 400px;" Name="DropDownBindValue" />
</RadzenStack>
@code {
decimal? value = 0;
IEnumerable<decimal?> data;
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
data = dbContext.Products.Select(c => c.UnitPrice).Distinct();
}
}
Thank you. I got it working.
