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

dropdownlist: prevent opening in onOpen event

1 Answer 282 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Maksim
Top achievements
Rank 1
Maksim asked on 25 Feb 2014, 09:56 AM
1) http://jsfiddle.net/3ML7s/3/
now uncomment data  {text: "Item", value:"2"},
when I select vocabulary item I open a popup window
which inserts new value into dropdown and closes it, for simplicity, 'showModalDialog' replaced here by 'alert'

2) now comment data  {text: "Item", value:"2"},
when there no real items (just 'empty' and 'vocabulary') I need to open vocabulary immideatly
when popup closes dropdown widget stays still open
but I need mimic 1):
close dropdown and switch to empty item

How can I do this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 27 Feb 2014, 08:45 AM
Hello Maksim,

You can prevent the opening of the DropDown's popup by calling e.preventDefault() on open event.
Please check the updated jsFiddle example: http://jsfiddle.net/3ML7s/6/

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