1

How to disable filtering in kendo autocomplete UI? I am getting 5 records on search but only matching records are shown in autocomplete popup even though I haven't used filters.

scope.autocompleteOptions = {
        dataTextField: 'description',
        minLength:1,
        dataSource:{
          data: locationsData, 
          group:'provider',
          serverFiltering:false
        },
        template: kendo.template($('#roc-map-places-template').html())
    }

Any ideas?

Thanks in advance.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
Kiran Pawar
  • 322
  • 1
  • 2
  • 16
  • Refer this http://dojo.telerik.com/ikaYU – Sanyami Vaidya May 31 '17 at 08:18
  • Thanks @SanyamiVaidya , But my question is about `kendo ui autocomplete`. I am unable to disable filtering in `kendo autocomplete`. – Kiran Pawar May 31 '17 at 09:47
  • What filtering are you referring to? – Shai Jun 04 '17 at 11:48
  • I was not referring to server filtering here. I have already disabled it by doing `serverFiltering: false`. My concern was to disable all type of filtering. I have read in documentation that `filter: 'startswith'` is default filtering for `kendo autocomplete UI` and i have to disable it. – Kiran Pawar Jun 05 '17 at 07:18

2 Answers2

0

I could clear filters in kendo ui autocomplete as follows :

var autocomplete=$('#autocomplete').data('kendoAutoComplete');
autocomplete.dataSource.filter([]);

This will just clear filters.

This would not disable filters but clears it.

Kiran Pawar
  • 322
  • 1
  • 2
  • 16
0

Late reply - but I just needed the same ability -

Solution: Use the "filtering" event Example: see https://docs.telerik.com/kendo-ui/api/javascript/ui/autocomplete/events/filtering

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
  dataSource: [ "Apples", "Oranges" ],
  filtering: function(e) {
      var filter = e.filter;

      if (!filter.value) {
        //prevent filtering if the filter does not value
        e.preventDefault();
      }
  }
});
</script>