How to load data from database using Blazor Autocomplete

Answer:

We can load the data dynamically in the filtering event and pass the result to the Filter method with the query property as an argument.

public void onFiltering(Syncfusion.Blazor.DropDowns.FilteringEventArgs args)

{

args.PreventDefaultAction = true;

var query = new Query();

if (args.Text != "")

{

query = new Query().Where(new WhereFilter()

{

Field = "Name",

value = args.Text,

Operator = "Contains",

IgnoreCase = true

});

}

this.AutoCompleteObj.Filter(LocalData, query);

}


Find the sample to load data from database using Blazor Autocomplete from here.

Loader.
Up arrow icon