close
()
// get a reference to the dropdown widget
var dropdownList = $("#dropdownList").data("kendoDropDownList");
// close the dropdown
dropdownlist.close();
dataItem
(index)
: Object
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// get the dataItem corresponding to the selectedIndex.
var dataItem = dropdownlist.dataItem();
// get the dataItem corresponding to the passed index.
var dataItem = dropdownlist.dataItem(1);
index
: Number
enable
(enable)
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// disable the dropdown list
dropdownlist.enable(false);
enable
: Boolean
open
()
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// open the drop down
dropdownlist.open();
refresh
()
// get a referenence to the Kendo UI DropDownList
var dropdownlist = $("dropdownlist").data("kendoDropDownList");
// re-render the items in drop-down list.
dropdownlist.refresh();
search
(word)
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// Selects item which starts with "In".
dropdownlist.search("In");
word
: string
select
(li)
: Number
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// selects by jQuery object
dropdownlist.select(dropdownlist.ul.children().eq(0));
// selects by index
dropdownlist.select(1);
// selects item if its text is equal to "test" using predicate function
dropdownlist.select(function(dataItem) {
return dataItem.text === "test";
});
li
: jQuery | Number | Function
text
(text)
: String
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// get the text of the dropdownlist.
var text = dropdownlist.text();
text
: String
toggle
(toggle)
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// toggles the open state of the drop-down list.
dropdownlist.toggle();
toggle
: Boolean
value
(value)
: String
// get a reference to the dropdown list
var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
// get the value of the dropdownlist.
var value = dropdownlist.value();
// set the value of the dropdownlist.
dropdownlist.value("1"); //looks for item which has value "1"
value
: String