columns.headerTemplate String|Function

The template which renders the column header content. By default, the value of the title column option is displayed in the column header cell.

If sorting is enabled, the column header content will be wrapped in an <a> element. As a result, the template must contain only inline elements.

Example - defining the column header template as a string

<div id="gantt"></div>
<script>
$("#gantt").kendoGantt({
  dataSource: [
    {
      id: 1,
      orderId: 0,
      parentId: null,
      title: "Task1",
      start: new Date("2014/6/17 9:00"),
      end: new Date("2014/6/17 11:00")
    },
    {
      id: 2,
      orderId: 1,
      parentId: null,
      title: "Task2",
      start: new Date("2014/6/17 12:00"),
      end: new Date("2014/6/17 14:00")
    },
    {
      id: 3,
      orderId: 2,
      parentId: null,
      title: "Task3",
      start: new Date("2014/6/17 13:00"),
      end: new Date("2014/6/17 15:00")
    }

  ],
  dependencies: [
    {
      predecessorId: 1,
      successorId: 2,
      type: 1
    }
  ],
  columns: [
    {
      field: "title",
      headerTemplate: '<input type="checkbox" id="check-all" /><label for="check-all">check all</label>'
    },
    {
      field: "start",
      title: "Start Time"
    },
    {
      field: "end",
      title: "End Time"
    }
  ]
});
</script>
In this article
Not finding the help you need? Improve this article