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

Multiselect in Grid Toolbar Template

1 Answer 132 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Umut
Top achievements
Rank 1
Umut asked on 02 Apr 2015, 10:34 AM
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 ? 

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 06 Apr 2015, 06:27 AM
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.

 
Tags
Grid
Asked by
Umut
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or