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

Clear ComboBox programmatically

2 Answers 1205 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 25 Apr 2018, 08:14 PM

Is it possible to trigger the clear button on a ComboBox?

I'm using $("#ComboBox").data("kendoComboBox").text(''); and $("#ComboBox").data("kendoComboBox").select(-1); to "clear" the input, but the X button is still present when you hover over the input.

Thanks

2 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 26 Apr 2018, 06:08 PM

Figured it out..

$("#ComboBox").data("kendoComboBox").select(-1);
$("#ComboBox").data("kendoComboBox").refresh();

0
Ivan Danchev
Telerik team
answered on 27 Apr 2018, 06:56 AM
Hello Michael,

The widget's clear button should not be displayed when there is not item selected, so we logged this behavior for fixing. The bug's status can be tracked through this issue on our public Github repo.

Thank you for reporting it. I updated your Telerik points.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ComboBox
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or