Populate description on enum properties using FluentCombobox components in FluentUI library
Posted 86 days ago
by Mundas26
In this code, only the variables of the Enum properties have populated in the combobox. What I want to be populated in combobox is the "[Description("Personal Claim")] and [Description("Insurance Claim")]". Can someone know how to implement this?
<FluentGridItem xs="12" sm="6" md="3">
<div class="card" style="margin-bottom: 5px;">
<FluentCombobox Label="Claim type:" onkeydown="return false" Items="Enum.GetValues<ClaimTypes>()" Width="100%" @bind-SelectedOption="@Car.ClaimType" />
</div>
</FluentGridItem>
public enum ClaimTypes
{
[Description("Personal Claim")]
Personal = 0,
[Description("Insurance Claim")]
Insurance = 1,
}
Someone is typing...
Post a Reply
You must be logged in to add a new post.
Number of online users: 0