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

Filter by contains

Is posible to filter by contains in multiselect dropdown when using webapi adaptor?
When I type something in filter box it seems always add a $filter=startswith(tolower option to querystring.

1 Reply

NP Narayanasamy Panneer Selvam Syncfusion Team October 31, 2019 11:59 AM UTC

Yes, it is possible that to filter by Contains in WebAPI adaptor. We have API to filter based on value contains in multiselect. 
The FilterType API will let you to use following options, 
  1. StartsWith (default)
  2. EndsWith
  3. Contains
If you are not mentioned any type to the above API, it will take default type of filtering as StartsWith 
Code example for reference: 
EjsMultiSelect TValue="int?[]" FilterType="@Syncfusion.EJ2.Blazor.DropDowns.FilterType.Contains" AllowFiltering="true" Placeholder="Select a name" Query="@RemoteQuery"> 
            <EjsDataManager Url="https://ej2services.syncfusion.com/production/web-services/api/Employees" Adaptor="@Syncfusion.EJ2.Blazor.Adaptors.WebApiAdaptor" CrossDomain=true></EjsDataManager> 
            <MultiSelectFieldSettings Text="FirstName" Value="EmployeeID"></MultiSelectFieldSettings> 

API References:
Kindly, get back to us if you need further assistance on this.

Narayanasamy P.

Live Chat Icon For mobile
Up arrow icon