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
close icon

Is there a way to filter by any string within a value.

Is it possible to have a drop down, combo box, or auto completer to show results where any part matches the text typed? For example: Given the following values to select from:

Bob Smith
Jane Smithson
Becky Smithers
Bob Schultz

I type: "smith" and get back the following results:

Bob Smith
Jane Smithson
Becky Smithers


Thanks!

1 Reply

SA Shameer Ali Baig Sulaiman Ali Baig Syncfusion Team December 30, 2019 04:57 AM UTC

Hi Michael,  
  
Thanks for contacting Syncfusion support.  
  
We have checked with your query. To achieve your expected requirement in EJ AutoComplete, use FilterType and HighlightSearch properties. 
 
Using FilterType property, you can filter the data which contains the typed text and HighlightSearch property can be used to highlight the typed text from the filtered list of data in the dropdown. 
 
Refer the below code block:  
 
<ej:Autocomplete ID="AutoComplete" runat="server" HighlightSearch="true" FilterType="Contains" DataTextField="ComponentNameDataUniqueKeyField="ComponentId" Width="500px"></ej:Autocomplete>  
 
  
  
Also, refer the below documentation link to customize the search results.  
  
Please, let us know if you need any further assistance. 
  
 
Regards,  
Shameer Ali Baig S. 


Loader.
Live Chat Icon For mobile
Up arrow icon