• close ()
    Closes the drop-down list.

    Example

    // get a reference to the dropdown widget
    var dropdownList = $("#dropdownList").data("kendoDropDownList");
    // close the dropdown
    dropdownlist.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 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);

    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 dropdownlist widget

    Example

    // get a reference to the dropdown list
    var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
    // disable the dropdown list
    dropdownlist.enable(false);

    Parameters

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

    Example

    // get a reference to the dropdown list
    var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
    // open the drop down
    dropdownlist.open();
  • refresh ()
    Re-render the items in drop-down list.

    Example

    // 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)
    Selects item, which starts with the provided parameter.

    Example

    // get a reference to the dropdown list
    var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
    
    // Selects item which starts with "In".
    dropdownlist.search("In");

    Parameters

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

    Example

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

    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.
  • text (text) : String
    Gets/Sets the text of the dropdownlist.

    Example

    // get a reference to the dropdown list
    var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
    
    // get the text of the dropdownlist.
    var text = dropdownlist.text();

    Parameters

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

    Example

    // get a reference to the dropdown list
    var dropdownlist = $("#dropdownlist").data("kendoDropDownList");
    
    // toggles the open state of the drop-down list.
    dropdownlist.toggle();

    Parameters

    toggle: Boolean
    Defines the whether to open/close the drop-down list.
  • value (value) : String
    Gets/Sets the value of the dropdownlist. The value will not be set if there is no item with such value. If value is undefined, text of the data item is used.

    Example

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

    Parameters

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