<SfDropDownList @bind-Value="@this.Customer.CustomerGroupId" DataSource="@CustomerGroupList" TItem="CustomerGroup" TValue="long?">
<DropDownListEvents ValueChange="CustomerGroupOnValueChange" TItem="CustomerGroup" TValue="long?"></DropDownListEvents>
<DropDownListFieldSettings Value="CustomerGroupId" Text="CustomerGroupName"></DropDownListFieldSettings>
</SfDropDownList>
public void CustomerGroupOnValueChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<long?, CustomersdbShared.Models.CustomerGroup> args)
{
this.Customer.CustomerGroup = args.ItemData.CustomerGroupName;
}
public class CustomerGroup
{
public long CustomerGroupId { get; set; }
public string CustomerGroupName { get; set; }
}
Comments