• close ()
    Closes the drop-down list.

    Example

    // get a reference to instance of the Kendo UI ComboBox
    var combobox = $("#comboBox").data("kendoComboBox");
    combobox.close();
  • dataItem (index) : Object
    Returns the raw data record at the specified index. If the index is not specified, the selected index will be used.

    Example

    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);

    Parameters

    index: Number
    The zero-based index of the data record
    Returns
    Object The raw data record. Returns undefined if no data.
  • enable (enable)
    Enables/disables the combobox widget

    Example

    // get a reference to instance of the Kendo UI ComboBox
    var combobox = $("#comboBox").data("kendoComboBox");
    // disables the combobox
    combobox.enable(false);

    Parameters

    enable: Boolean
    Desired state
  • open ()
    Opens the drop-down list.

    Example

    // get a reference to instance of the Kendo UI ComboBox
    var combobox = $("#comboBox").data("kendoComboBox");
    combobox.open();
  • refresh ()
    Re-render the items of the drop-down list.

    Example

    // 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)
    Filters dataSource using the provided parameter and rebinds drop-down list.

    Example

    var combobox = $("#combobox").data("kendoComboBox");
    
    // Searches for item which has "In" in the name.
    combobox.search("In");

    Parameters

    word: string
    The filter value.
  • select (li) : Number
    Selects drop-down list item and sets the value and the text of the combobox.

    Example

    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";
    });

    Parameters

    li: jQuery | Number | Function
    LI element or index of the item or predicate function, which defines the item that should be selected.
    Returns
    Number The index of the selected LI element.
  • suggest (value)
    Forces a suggestion onto the text of the ComboBox.

    Example

    // 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");

    Parameters

    value: string
    Characters to force a suggestion.
  • text (text) : String
    Gets/Sets the text of the ComboBox.

    Example

    var combobox = $("#combobox").data("kendoComboBox");
    
    // get the text of the combobox.
    var text = combobox.text();

    Parameters

    text: String
    The text to set.
    Returns
    String The text of the combobox.
  • toggle (toggle)
    Toggles the drop-down list between opened and closed state.

    Example

    var combobox = $("#combobox").data("kendoComboBox");
    
    // toggles the open state of the drop-down list.
    combobox.toggle();

    Parameters

    toggle: Boolean
    Defines the whether to open/close the drop-down list.
  • value (value) : String
    Gets/Sets the value of the combobox. If the value is undefined, text of the data item will be used.

    Example

    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"

    Parameters

    value: String
    The value to set.
    Returns
    String The value of the combobox.