close
()
// get a reference to instance of the Kendo UI ComboBox
var combobox = $("#comboBox").data("kendoComboBox");
combobox.close();
dataItem
(index)
: Object
var combobox = $("#combobox").data("kendoComboBox");
// get the dataItem corresponding to the selectedIndex.
var dataItem = combobox.dataItem();
// get the dataItem corresponding to the passed index.
var dataItem = combobox.dataItem(1);
index
: Number
enable
(enable)
// get a reference to instance of the Kendo UI ComboBox
var combobox = $("#comboBox").data("kendoComboBox");
// disables the combobox
combobox.enable(false);
enable
: Boolean
open
()
// get a reference to instance of the Kendo UI ComboBox
var combobox = $("#comboBox").data("kendoComboBox");
combobox.open();
refresh
()
// get a referenence to the Kendo UI ComboBox
var combobox = $("#combobox").data("kendoComboBox");
// re-render the items of the drop-down list.
combobox.refresh();
search
(word)
var combobox = $("#combobox").data("kendoComboBox");
// Searches for item which has "In" in the name.
combobox.search("In");
word
: string
select
(li)
: Number
var combobox = $("#combobox").data("kendoComboBox");
// selects by jQuery object
combobox.select(combobox.ul.children().eq(0));
// selects by index
combobox.select(1);
// selects item if its text is equal to "test" using predicate function
combobox.select(function(dataItem) {
return dataItem.text === "test";
});
li
: jQuery | Number | Function
suggest
(value)
// note that this suggest is not the same as the configuration method
// suggest which enables/disables auto suggesting for the ComboBox
//
// get a referenence to the Kendo UI ComboBox
var combobox = $("#combobox").data("kendoComboBox");
// force a suggestion to the item with the name "Inception"
combobox.suggest("Inception");
value
: string
text
(text)
: String
var combobox = $("#combobox").data("kendoComboBox");
// get the text of the combobox.
var text = combobox.text();
text
: String
toggle
(toggle)
var combobox = $("#combobox").data("kendoComboBox");
// toggles the open state of the drop-down list.
combobox.toggle();
toggle
: Boolean
value
(value)
: String
var combobox = $("#combobox").data("kendoComboBox");
// get the value of the combobox.
var value = combobox.value();
// set the value of the combobox.
combobox.value("1"); //looks for item which has value "1"
value
: String