Customize Filter Autocomplete options with complex object

1 Answer 66 Views
Top achievements
Rank 1
Stacey asked on 05 Oct 2023, 08:54 PM

I have a Kendo Grid where one of the columns contains an array of strings.   I would like to use filtering on this column, but it would need to pull the distinct values of the array for each row.

I'm looking for the best approach to achieve my desired result.


i have created the following example where i would want to be able to filter on the classes column


<!DOCTYPE html>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="">
<div id="studentList"></div>
$(document).ready(function () {
      var dataSource = new{
        data: [
          {id: 1, name: 'Harry Potter', classes: ['Arithmancy', 'Potions', 'Divination'], house: 'Gryffindor'}
          , {id: 2, name: 'Blaise Zabini', classes: ['Herbology', 'History of Magic', 'Transfiguration'], house: 'Slytherin'}
          , {id: 3, name: 'Dennis Creevy', classes: ['Charms', 'Potions', 'History of Magic'], house: 'Hufflepuff'}
          , {id: 4, name: 'Luna Lovegood', classes: ['Divination', 'Charms'], house: 'Ravenclaw'}
        columns: [
          { field: 'name', title: 'Student Name' },
          { field: 'classes', title: 'Enrolled Classes', template: function(row) {
          return row.classes.join('<br />')
          { field: 'house', title: 'House Affiliation' }
        dataSource: dataSource,
        filterable: { mode: "row"}

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 10 Oct 2023, 10:42 AM

Hello Stacey,

By default, the Kendo Grid does not provide filtering on columns containing arrays. There is a related feature request that you could vote for and also find more related resources:

You could also check the following forum thread where such an issue is discussed:


However, as a workaround in the Dojo provided in your email you could use a custom filterable.cell.template. Then when the search value is changed, you can apply custom logic to filter the Grid. In the modified Dojo example I am using the setDataSource method to render the filtered items. However, note that this approach may not be suitable for all scenarios as it entirely resets the dataSource for the Grid. 

I hope this helps.

Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question