headerTemplate String|Function

Specifies a static HTML content, which will be rendered as a header of the popup element.

  • The header content must be wrapped with a HTML tag if it contains more than one element. This is applicable also when header content is just a string/text.
  • Widget does not pass model data to the header template. Use the header template only with static HTML (only presentation elements and not functionality like data bound inputs or fields).

Example - specify headerTemplate as a string

<input id="dropdownlist" />
<script>
$("#dropdownlist").kendoDropDownList({
  dataSource: [
    { id: 1, name: "Apples" },
    { id: 2, name: "Oranges" }
  ],
  dataTextField: "name",
  dataValueField: "id",
  headerTemplate: '<div><h2>Fruits</h2></div>'
});
</script>
In this article