We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to filter %LIKE% in a dropdown list

Thread ID:





150177 Dec 23,2019 07:59 PM UTC Dec 30,2019 03:54 AM UTC Blazor 3
Tags: Dropdown List
Scott Peal
Asked On December 23, 2019 07:59 PM UTC

How do we get the dropdown list to filter items containing the filtered value? My code below only seems to filter the start of the text. For example, we have customer code and customer number as an item. Sometimes the user wants to search by code and others by customer name.

BTW, I tried this with a dropdown template and it only searched on one of the fields. So I combined the fields at the datasource list call.

    <EjsDropDownList TValue="string" TItem="CustomerPickerItem" AllowFiltering=true IgnoreAccent=true Placeholder="Select a customer" DataSource="@CustomerList">
        <DropDownListFieldSettings Text="CodeName" Value="CustomerId"></DropDownListFieldSettings>
        <DropDownListEvents TValue="string" ValueChange="CustomerPickerChanged"></DropDownListEvents>

001 Mary Smith
234 John Doe


Sevvandhi Nagulan [Syncfusion]
Replied On December 24, 2019 08:33 AM UTC

Hi Scott 
Greetings from Syncfusion support. 
You can filter the contains using the FilterType as contains. Kindly refer the below code, 
    <EjsDropDownList Placeholder="e.g. Australia" TValue="string" TItem="Countries" AllowFiltering=true IgnoreAccent=true DataSource="@Country" FilterType="Syncfusion.EJ2.Blazor.DropDowns.FilterType.Contains"> 
        <DropDownListFieldSettings Value="Code" Text="Name"></DropDownListFieldSettings> 
Please find the sample below, 
Sevvandhi N  

Scott Peal
Replied On December 26, 2019 01:16 PM UTC

Fantastic, Thanks!

Sevvandhi Nagulan [Syncfusion]
Replied On December 30, 2019 03:54 AM UTC

Hi Scott, 
Thanks for the update. Please let us know if you need any other further assistance on this.  
Sevvandhi N 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon