Problème with filter

2 posts, 0 answers
  1. Dany
    Dany avatar
    7 posts
    Member since:
    Oct 2015

    Posted 30 Nov 2017 Link to this post

    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();
                }
            });

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1348 posts

    Posted 04 Dec 2017 Link to this post

    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.
Back to Top