New to Kendo UI for jQuery? Download free 30-day trial

Templates

The ListBox supports the use of templates for its items that are passed as a function or string.


    <script type="text/kendo-x-tmpl" id="template">
        <h5 style="color:#=data.color#">#=name#</h5>
    </script>

    <select id="listbox"></select>
    <script>
        $("#listbox").kendoListBox({
            dataSource: {
                data: [
                    { name: "Red", color: "red" },
                    { name: "Blue", color: "blue" },
                    { name: "Green", color: "green" }
                ]
            },
            template: kendo.template($("#template").html())
        });
    </script>

See Also

In this article