Edit this page

resources.dataSource Object |Array |kendo.data.DataSource

The data source which contains resource data items. Can be a JavaScript object which represents a valid data source configuration, a JavaScript array or an existing kendo.data.DataSource instance.

If the dataSource option is set to a JavaScript object or array the widget will initialize a new kendo.data.DataSource instance using that value as data source configuration.

If the dataSource option is an existing kendo.data.DataSource instance the widget will use that instance and will not initialize a new one.

Example - set the resource data source

<div id="gantt"></div>
  dataSource: [{
    id: 0,
    orderId: 0,
    parentId: null,
    title: "Task1",
    start: new Date("2014/6/17 9:00"),
    end: new Date("2014/7/01 11:00")
  resources: {
    dataSource: [
      { id: 0, name: "Resource 1", color: "green" },
      { id: 1, name: "Resource 2", color: "#32cd32" }
  assignments: {
    dataSource: [
      { taskId: 0, resourceId: 1, value: 1 }
  views: ["week"]
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article