Hi,
Following is my requirement
1. On load the Gantt is initialized with a default set of tasks called activities
2. each activity can have one or more child tasks
3. The child task is added using a Add Task button just below the activity
4. on click of Add task a new task is added as child to the activity preceeding the Add Task button/link row
I am able to achieve 1 & 3 from a UI perspective .The Add Task row is also a task which is restyled/ retemplated on databound based on a custom task type to remove other task related information and just show an add task link.
I am able to catch the event on add task click and also get the id of the row/task but i am not able to add a new task as a child programatically to the activity above These are bits of code i have tried.
function
addTask(adderButtonRowId) {
var
gantt = $(
"#gantt"
).data(
"kendoGantt"
);
var
task = getNewTask(adderButtonRowId);
var
taskNew =
new
kendo.data.GanttTask(task);
gantt.dataSource.add(taskNew);
}
After executing this however the UI is not rendered as expected. The getNewTask method returns a task object with attributes such as parentId, orderId and id set appropriately internally so that the new task is child of the preceeding activity and in proper order.
Please let know what am i missing, Any help appreciated.Thanks in advance.