dataBinding

Fired before the widget binds to its data source.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.sender kendo.ui.Gantt

The widget instance which fired the event.

e.preventDefault Function

If invoked prevents the data bind action and dataBound event will not fire.

Example - subscribe to the "dataBinding" event during initialization

<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")
    }
  ],
  dataBinding: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("dataBinding");
  }
});
</script>

Example - subscribe to the "dataBinding" after initialization

<div id="gantt"></div>
<script>
function gantt_dataBinding(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log("dataBinding");
}
$("#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")
    }
  ]
});
var gantt = $("#gantt").data("kendoGantt");
gantt.bind("dataBinding", gantt_dataBinding);
</script>
In this article