Edit this page

select

Gets or sets the selected ListBox items.

Parameters

items jQuery |Array

The items that are to be selected.

Returns

jQuery - The selected items if called without arguments.

Example

<select id="listBox"></select>
<script>
$("#listBox").kendoListBox({
    dataSource: {
        data: [
            { id: 1, name: "Jane Doe", age: 47 },
            { id: 2, name: "John Doe", age: 50 }
        ]
    },
    template: "<div>#:name#</div>"
});
// get a reference to the list box widget
var listBox = $("#listBox").data("kendoListBox");
// selects first list box item
listBox.select(listBox.items().first());
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy