New to Kendo UI for jQuery? Start a free 30-day trial

Returns a list of all tasks that have the same parent.

Parameters:taskkendo.data.GanttTask

The reference task.

Returns:Array

—The list of all tasks with the same parent as the parameter task. If the parameter task is a root-level task, all root-level tasks are returned.

<script>
  var dataSource = new kendo.data.GanttDataSource({
    data: [
      {
        id: 1,
        orderId: 0,
        parentId: null,
        title: "Task1",
        summary: true,
        start: new Date("2014/6/17 9:00"),
        end: new Date("2014/6/17 11:00")
      },
      {
        id: 2,
        orderId: 0,
        parentId: 1,
        title: "Task2",
        start: new Date("2014/6/17 9:00"),
        end: new Date("2014/6/17 11:00")
      },
      {
        id: 3,
        orderId: 1,
        parentId: 1,
        title: "Task3",
        start: new Date("2014/6/17 12:00"),
        end: new Date("2014/6/17 13:00")
      }
    ]
  });

  dataSource.fetch();

  // returns a list with the two sibling tasks.
  var childTasks = dataSource.taskSiblings(dataSource.at(1));
</script>
Not finding the help you need?
Contact Support