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

Clear search on open ComboBox

4 Answers 591 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Janusz
Top achievements
Rank 1
Janusz asked on 25 Mar 2015, 07:22 AM
I have ComboBox, with seted filter to "contins" and serverFiltering to true.
It is possible to clear previous filter (when user enter text into CB) ? because now user need to clear whole combo box to reset filter.

4 Answers, 1 is accepted

Sort by
0
Janusz
Top achievements
Rank 1
answered on 25 Mar 2015, 07:23 AM
It will be good to have dit option on forum :)

One more think: I know that is possible with search('') but it cause open CB.
0
Georgi Krustev
Telerik team
answered on 26 Mar 2015, 05:06 PM
Hello Janusz,

One possible way to accomplish your goal is to clear the input value and reset the data source filters:
//clear text
combobox.text("");
 
//reset filters
combobox.dataSource.filter({});

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Janusz
Top achievements
Rank 1
answered on 30 Mar 2015, 11:30 AM
Ok, it will work :
combobox.dataSource.filter({});

but I lost cascade filter :)
0
Georgi Krustev
Telerik team
answered on 01 Apr 2015, 07:28 AM
Hello Janusz,

Indeed, you will clear all filters with .filter({}) method call. What you can do is to get the applied filters, strip only the one you want and re-filter the source. This is something that the widget itself does (link to the source).

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
ComboBox
Asked by
Janusz
Top achievements
Rank 1
Answers by
Janusz
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or