Edit this page

taskTemplate String |Function

The template used to render the gantt tasks.

The fields which can be used in the template are the task fields

Example - set the task template

<script id="task-template" type="text/x-kendo-template">
  <div> #= title # </div>
  <div>
    Start at #: start.toLocaleTimeString() #
    <br />
    End at #: end.toLocaleTimeString() #
  </div>
</script>
<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 12:00")
  }, {
    id: 2,
    orderId: 0,
    parentId: null,
    title: "Task2",
    start: new Date("2014/6/17 11:00"),
    end: new Date("2014/6/17 14:00")
  }],
  showWorkHours: false,
  rowHeight: 70,
  taskTemplate: $("#task-template").html()
});
</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