items

Obtains an Array of the DOM elements, which correspond to the data items from the Kendo UI DataSource view (e.g. the ones that match the user's last filtering input).

Example

<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
    dataSource: ["Apple", "Banana", "Cherry", "Date", "Elderberry"],
    filter: "startswith",
    suggest: true
});

// Get reference to the autocomplete widget
var autocomplete = $("#autocomplete").data("kendoAutoComplete");

// Type some text to filter the items
autocomplete.search("a");

// Get the currently rendered items
setTimeout(function() {
    var items = autocomplete.items();
    console.log("Number of rendered items:", items.length);
    console.log("First item text:", items.first().text());
}, 100);
</script>

Returns

Array The currently rendered dropdown list items (<li> elements).

In this article
items
Not finding the help you need?
Contact Support