TaskAllChildren
methodsReturns a list of all child tasks. The search is recursive.
Returns:Array
—The list of all child tasks.
<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",
summary: true,
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
},
{
id: 3,
orderId: 0,
parentId: 2,
title: "Task3",
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
}
]
});
dataSource.fetch();
// returns a list of the two child tasks.
var childTasks = dataSource.taskAllChildren(dataSource.at(0));
</script>
<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",
summary: true,
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
},
{
id: 3,
orderId: 0,
parentId: 2,
title: "Task3",
start: new Date("2014/6/17 9:00"),
end: new Date("2014/6/17 11:00")
}
]
});
dataSource.fetch();
// returns a list of all three tasks.
var childTasks = dataSource.taskAllChildren();
</script>