Multiselect in Grid Toolbar Template

2 posts, 0 answers
  1. Umut
    Umut avatar
    6 posts
    Member since:
    Mar 2015

    Posted 02 Apr 2015 Link to this post

    Hi All,
    In the example : http://demos.telerik.com/aspnet-mvc/grid/toolbar-template , i want to filter my grid with multi-select. Is there any demo or tutorial about this ? 

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1444 posts

    Posted 06 Apr 2015 Link to this post

    Hello Umut,

    You can use the same approach, just iterate over the MultiSelect values array and add separate filtering criteria for each item. For example: 
    var value = this.value();
    var filters = [];
    for (var i = 0; i < value.length; i++) {
        filters.push({ field: "SomeField", operator: "eq", value: value[i] });
    }
    grid.dataSource.filter({logic: "or", filters: filters});

    Regards,
    Alexander Popov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top