schema Object

The schema configuration of the GanttDataSource.

schema.model Object

The model configuration of the GanttDataSource. See GanttTask for more info.

Example - configure the data source model schema

<script>
var dataSource = new kendo.data.GanttDataSource({
  transport: {
    read: {
      url: "https://demos.telerik.com/kendo-ui/service/GanttTasks",
      dataType: "jsonp"
    },
    update: {
      url: "https://demos.telerik.com/kendo-ui/service/GanttTasks/Update",
      dataType: "jsonp"
    },
    destroy: {
      url: "https://demos.telerik.com/kendo-ui/service/GanttTasks/Destroy",
      dataType: "jsonp"
    },
    create: {
      url: "https://demos.telerik.com/kendo-ui/service/GanttTasks/Create",
      dataType: "jsonp"
    }
  },
  schema: {
    model: {
      id: "id",
      fields: {
        id: { from: "ID", type: "number" },
        orderId: { from: "OrderID", type: "number", validation: { required: true } },
        parentId: { from: "ParentID", type: "number", validation: { required: true } },
        start: { from: "Start", type: "date" },
        end: { from: "End", type: "date" },
        title: { from: "Title", defaultValue: "", type: "string" },
        percentComplete: { from: "PercentComplete", type: "number" },
        summary: { from: "Summary" },
        expanded: { from: "Expanded" }
      }
    }
  }
});
dataSource.fetch(function() {
  var task = this.at(0);
  console.log(task.title);
});
</script>
In this article
Not finding the help you need?