what does refreshdata() do?


I have customized the lightbox of the gantt for a predecessor section, which once entered will add the link between tasks and update the child task.

have added the code snippet link here please go through it and let me know where i am going wrong.


please clarify what the problem is.
I’ve opened the demo and created couple of tasks - all seemed to work normally. screencast.com/t/4U9rgayY0

I did reproduce couple of errors, but the required steps to reproduce them are not obvious and investigating will take unnecessary amount of time. If you describe the problem and when it happens - I will be able to check it

create a task first and then add another task and fill in the task id of the first task in the second task. A link is created between the two tasks of type end to start (“0”).

Based on the type of the link i am updating the start and end dates of the second task.

The task seems to get updated but as soon as it comes to gantt.refreshData() call, it again changes its date.

I want the task dates to be updated and not reverted back.

In onLightboxSave event your task is not saved yet. If you want to add changes to event in this handler you should change task object (second argument). In your example this object stays untoched and when lightbox saves it rewrites new values with values set in lightbox.