This is a migrated thread and some comments may be shown as answers.

Problème with filter

1 Answer 39 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Dany
Top achievements
Rank 1
Dany asked on 30 Nov 2017, 08:57 PM

Hi

Here's my multiselect definition. Is it possible to filter on 2 values. I have category with name and keyword properties, actually i display Name and filtering on name work well but i also want multi select to search on keyword also. Is it possible ?

 

$("#searchFilter").kendoMultiSelect({
            placeholder: "Catégories de biens et services...",
            filter: "contains",
            dataTextField: "Name",
            dataValueField: "ServiceID",
            height: 400,
            dataSource: {
                data: @(New HtmlString(Json.Encode(Model.ServicesFilter))),
                group: { field: "ParentBreadcrumb" },
                },           
            change: function(){
                PMEL_SupplierSearch.triggerSearch();
            }
        });

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 04 Dec 2017, 09:00 AM
Hi Dany,

By default filtering is performed by a single DataSource field - the one set as DataTextField ("Name" in your case). If you want to perform filtering by 2 fields you can achieved this by setting the DataSource filters explicitly. See this dojo example, which demonstrates how this can be done:
  • the widget's filtering event is prevented 
  • two DataSource filters are set so that the MultiSelect is filtered by "ContactName" and "Country".

I hope this example is helpful.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MultiSelect
Asked by
Dany
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or