When the drop down list is first rendered, it shows that it is a drop down but has no selected value. Once you click the drop down, the available values display and it will default to the selected value. I want to provide a reset button to reset it to it's initial state of "unselected" - is there a way to do this? I tried passing values and selects to non-existent indices and it just ignores these.
6 Answers, 1 is accepted
0
Hello Jeremy,
Georgi Krustev
the Telerik team
The DropDownList widget is designed to always have a selected item. In your case, I believe that the DropDownList uses load on demand binding (autoBind: false) and that is why it is empty. Once it is bound then it always will have selected item. You can use the ComboBox widget, which allows "unselected" state.
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Atlas
Top achievements
Rank 1
answered on 23 May 2013, 12:32 AM
I am looking at your demo: http://demos.kendoui.com/web/combobox/index.html which displays a combobox that is initially not set to a value, it just displays the Placeholder text. Once you select a value, there is no way to deselect it or to go back to the initial state. How do you create an empty item to deselect a value? The combobox I am using is nullable, so you should be able to deselect once a value is selected and the only way I appear to be able to do that is to click into the combobox text and backspace it out.
This is counter intuitive.
How do I add a selectable item that reverts the value of the control to a null value?
This is counter intuitive.
How do I add a selectable item that reverts the value of the control to a null value?
0
Hello,
Georgi Krustev
Telerik
You can clear selection of the widget using value method. Check this jsBin demo for more information.
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Atlas
Top achievements
Rank 1
answered on 28 May 2013, 04:56 PM
Thank you for your reply, but I wasn't asking how to do it programatically.
I am referring to a user hitting the web page, making a selection on the dropdown, then being able to change the selection to nothing again.
In a classic dropdown the first item in the list would be something like Please Select, and once you select a value, you can still go back and select Please Select.
I don't see a way to do that with the Kendo DropDown.
I am referring to a user hitting the web page, making a selection on the dropdown, then being able to change the selection to nothing again.
In a classic dropdown the first item in the list would be something like Please Select, and once you select a value, you can still go back and select Please Select.
I don't see a way to do that with the Kendo DropDown.
0
0
Hello again,
Georgi Krustev
Telerik
The ComboBox widget supports only placeholder. In order to achieve your goal you will need to add such item (empty value and specific text) in the begining of the data collection.
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!