Edit this page

itemTemplate String |Function

The template used to render the items in the popup list.

Example - specify template as a function

<select id="multiselect" multiple="multiple"></select>
<script id="itemTemplate" type="text/x-kendo-template">
  <span>
    <img src="/img/#: id #.png" alt="#: name #" />
    #: name #
  </span>
</script>
<script>
$("#multiselect").kendoMultiSelect({
  dataSource: [
    { id: 1, name: "Apples" },
    { id: 2, name: "Oranges" }
  ],
  dataTextField: "name",
  dataValueField: "id",
  itemTemplate: kendo.template($("#itemTemplate").html())
});
</script>

Example - specify template as a string

<select id="multiselect" multiple="multiple"></select>
<script>
$("#multiselect").kendoMultiSelect({
  dataSource: [
    { id: 1, name: "Apples" },
    { id: 2, name: "Oranges" }
  ],
  dataTextField: "name",
  dataValueField: "id",
  itemTemplate: '<span><img src="/img/#: id #.png" alt="#: name #" />#: name #</span>'
});
</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