select

Selects the item provided as an argument and updates the value of the widget.

Important: When virtualization is enabled, the method does not support selection with a function predicate. The predicate function looks only in the current datasource view, which represents only the active range/page. Hence it will not work properly.

Important: This method does not trigger change event. This could affect MVVM value binding. The model bound to the widget will not be updated. You can overcome this behavior trigerring the change event manually using trigger("change") method.

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
    dataSource: [ "John", "Jane" ]
});
var autocomplete = $("#autocomplete").data("kendoAutoComplete");
autocomplete.search("J");
autocomplete.select(autocomplete.ul.children().eq(1)); // Selects the second suggestion which is "Jane"
autocomplete.trigger("change");
</script>

Parameters

item String|Element|jQuery

A string, DOM element or jQuery object which represents the item to be selected. A string is treated as a jQuery selector.

Example - select item

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
  dataSource: [ "John", "Jane" ]
});
var autocomplete = $("#autocomplete").data("kendoAutoComplete");
autocomplete.search("J");
autocomplete.select(autocomplete.ul.children().eq(1)); // Selects the second suggestion which is "Jane"
</script>
In this article
Not finding the help you need? Improve this article