New to Kendo UI for jQueryStart a free 30-day trial

Template

configuration

The template used to render the suggestions. By default the widget displays only the text of the suggestion (configured via dataTextField).

template

String|Function
<input id="autocomplete" />
<script id="template" type="text/x-kendo-template">
  <span>
    <img src="/img/#: id #.png" alt="#: name #" />
    #: name #
  </span>
</script>
<script>
$("#autocomplete").kendoAutoComplete({
  dataSource: [
    { id: 1, name: "Apples" },
    { id: 2, name: "Oranges" }
  ],
  dataTextField: "name",
  template: kendo.template($("#template").html())
});
</script>
<input id="autocomplete" />
<script>
$("#autocomplete").kendoAutoComplete({
  dataSource: [
    { id: 1, name: "Apples" },
    { id: 2, name: "Oranges" }
  ],
  dataTextField: "name",
  template: '<span><img src="/img/#: id #.png" alt="#: name #" />#: name #</span>'
});
</script>
Not finding the help you need?
Contact Support