Hi Prakash,
We have analyzed your query, but we are unable to understand your exact requirement. Hence, we have assumed to add new task for “Approve/review” above the milestone task and it can be achieve using “create” client side. We can also dynamically update using “endEdit” event.
Please find the code example below:
function create(args) {
var jsonData = $.extend([], args.model.updatedRecords);
for (var i = 0; i < jsonData.length; i++) {
if (!jsonData[i].hasChildRecords && jsonData[i].duration == 0) { this.selectedRowIndex(args.model.updatedRecords.indexOf(jsonData[i]));
this.addRecord({ "TaskID": jsonData[i].item[args.model.taskIdMapping] + 1, "TaskName": "Approved", "StartDate": jsonData[i].item[args.model.startDateMapping], "Duration": jsonData[i].item[args.model.durationMapping] + 1 }, ej.Gantt.RowPosition.AboveSelectedRow);
}
}
this.clearSelection();
} |
We have also prepared the sample based on this. Please find the sample from below location
If our assumption is wrong, please share us more details/screenshots related to this query with us. It would be helpful for us to serve you better.
Regards,
Jayakumar D