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

make combobox empty after return from controller

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rahul
Top achievements
Rank 1
Rahul asked on 02 Jul 2014, 01:21 PM
I have a kendo combobox
@(Html.Kendo().ComboBox()
 .Name("ddSystems")
.Filter("contains")
.Placeholder("-- Select --")
.BindTo((IEnumerable)ViewBag.systemList) )

Onchange, a textbox is loaded in ajax. A submit button posts the textbox value and combobox value to the controller. When I get back to the view, I need ddSystems to be reset to empty.
I used
$('#ddSystems').data('kendoComboBox').value(null)

and
$('#ddSystems').data('kendoComboBox').text('')


but it always retains the previously selected value. Since I use ajax, this will not display the textbox and I am stuck. Please help.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 07 Jul 2014, 02:50 PM
Hi,

Setting the value to null should reset the combobox. Here is a live demo: http://trykendoui.telerik.com/@korchev/ORuS

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