Ad

Kendo Grid DropDown Filter Different Versions Of Kendo.all.min.js Not Work?

I have follow jsfiddle 2013.2.716/js/kendo.all.min.js and the filter text works correctly with the 2013 version

var dropDown = gridEl.find(".k-toolbar label input[type=search]").bind('propertychange keyup input paste', function() {
  var value = $(this).val();
  if (value) {
    grid.dataSource.filter({
      field: labelFieldName,
      operator: "contains",
      value: value
    });
  } else {
    grid.dataSource.filter({});
  }
});

but if i use the version 2015 it not work jsfiddle 2015.2.624/js/kendo.all.min.js how I can solve this in the keyup event?

Ad

Answer

Try replace the class name .k-toolbar with .k-grid-toolbar

e.g.

var dropDown = gridEl.find(".k-grid-toolbar label input[type=search]").bind('propertychange keyup input paste', function() {
  var value = $(this).val();
  if (value) {
    grid.dataSource.filter({
      field: labelFieldName,
      operator: "contains",
      value: value
    });
  } else {
    grid.dataSource.filter({});
  }
});
Ad
source: stackoverflow.com
Ad