<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; }
    }
Last modified: April 9, 2021

Author

Comments

Write a Reply or Comment