Hi,
I am using SfAutoComplete in a EditForm.
Is it possible after typing a few characters and select a value from the dropdown the textbox above get the value from the dropdown?
<SfAutoComplete @ref="laklantnummer" TValue="string" TItem="RelationCustomerDto" DataSource="relationCustomerList" @bind-Value="model.LaKlantNummer">
<AutoCompleteEvents TItem="RelationCustomerDto" TValue="string" ValueChange="@RelationCustomerIdChanged"></AutoCompleteEvents>
<AutoCompleteFieldSettings Value="CustomerId"></AutoCompleteFieldSettings>
</SfAutoComplete>
Second question:
Is there a handler if no records found?
I think it's very usefull if not.
Best regards,
Thijs van Rijswijk
|
<SfAutoComplete TValue="string" TItem="RelationCustomerDto" Placeholder="Autocomplete" DataSource="relationCustomerList" @bind-Value="LaKlantNummer">
<AutoCompleteEvents TItem="RelationCustomerDto" TValue="string" CustomValueSpecifier="CustomValueHandler"></AutoCompleteEvents>
<AutoCompleteFieldSettings Value="ID"></AutoCompleteFieldSettings>
</SfAutoComplete>
<br />
<br />
<SfTextBox @bind-Value="@LaKlantNummer" Placeholder="Textbox"></SfTextBox>
@code{
public string LaKlantNummer { get; set; }
} |
|
<SfAutoComplete TValue="string" TItem="RelationCustomerDto" Placeholder="Autocomplete" DataSource="relationCustomerList" @bind-Value="LaKlantNummer">
<AutoCompleteEvents TItem="RelationCustomerDto" TValue="string" CustomValueSpecifier="CustomValueHandler"></AutoCompleteEvents>
<AutoCompleteFieldSettings Value="ID"></AutoCompleteFieldSettings>
</SfAutoComplete>
@code {
public void CustomValueHandler(CustomValueSpecifierEventArgs<RelationCustomerDto> args)
{
message = "Custom value event triggered";
}
} |
Hi,
Thank you.
Works like a charm.
Best regards.