|
private void onCustValueChange(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, FDICustomer> args)
{
if (args.Value != "" && args.Value != null)
{
var findCustomer = Customers.Find(x => x.CustAccount == args.Value);
if (findCustomer != null)
{
ChemOrderTable.CustName = findCustomer.Name;
}
else
{
ChemOrderTable.CustName = null;
ChemOrderTable.CustAccount = null;
comboboxCustomer.Value = null;
}
}
} |
|
<SfComboBox @ref="ComboBoxObj" TValue="string" TItem="GameFields" PopupHeight="230px" Placeholder="Select a game" DataSource="@Games" EnableVirtualization="true" Query="@query" AllowFiltering="true" @bind-Value="comboValue">
<ComboBoxEvents TValue="string" TItem="GameFields" OnActionComplete="OnActionComplete"></ComboBoxEvents>
<ComboBoxFieldSettings Text="Text" Value="ID"></ComboBoxFieldSettings>
</SfComboBox>
public void OnActionComplete(ActionCompleteEventArgs<GameFields> args)
{
foreach(var a in args.Result)
{
if (a.ID == value && !isFirst)
{
comboValue = a.ID;
isFirst = true;
}
}
} |