Search results

Filtering

The DropDownList has built-in support to filter data items when AllowFiltering is enabled. The filter operation starts as soon as you start typing characters in the search box.

@using Syncfusion.EJ2.Blazor.Data
@using Syncfusion.EJ2.Blazor.DropDowns

<EjsDropDownList TValue="string" Placeholder="Select a customer" Query="@Query" AllowFiltering=true>
    <EjsDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Employees" Adaptor="Adaptors.WebApiAdaptor" CrossDomain=true></EjsDataManager>
    <DropDownListFieldSettings Text="FirstName" Value="EmployeeID"></DropDownListFieldSettings>
</EjsDropDownList>

@code {
    public string Query = "new ej.data.Query().select(['FirstName', 'EmployeeID']).take(6).requiresCount()";
}

The output will be as follows.

DropDownList

Diacritics Filtering

DropDownList supports diacritics filtering which will ignore the Diacritics and makes it easier to filter the results in international characters lists when the IgnoreAccent is enabled.

In the following sample, data with diacritics are bound as dataSource for DropDownList.

@using Syncfusion.EJ2.Blazor.DropDowns

<EjsDropDownList TValue="string" Placeholder="e.g: Aero" AllowFiltering=true IgnoreAccent=true DataSource="@Country">
    <DropDownListFieldSettings Value="Name"></DropDownListFieldSettings>
</EjsDropDownList>

@code {

    public class Data
    {
        public string Name { get; set; }
    }

    List<Data> Country = new List<Data>
{
        new Data() { Name = "Aeróbics"},
        new Data() { Name = "Aeróbics en Agua"},
        new Data() { Name = "Aerografía"},
        new Data() { Name = "Águilas"},
        new Data() { Name = "Ajedrez"},
        new Data() { Name = "Ala Delta"},
        new Data() { Name = "Álbumes de Música"},
        new Data() { Name = "Alusivos"},
        new Data() { Name = "Análisis de Escritura a Mano"},
    };
}

The output will be as follows.

DropDownList