Do we have any event raised when a task is changed?
Hello,
It depends on how the task was changed.
If you dragged a task in the timeline, updated it via the lightbox or inline editor, or modified it with the Gantt API - all of these actions have different event handlers:
https://docs.dhtmlx.com/gantt/api__gantt_onbeforetaskchanged_event.html
https://docs.dhtmlx.com/gantt/api__gantt_onlightboxsave_event.html
https://docs.dhtmlx.com/gantt/api__gantt_onbeforetaskupdate_event.html
If you only need to know that a task was modified, you can use the onAfterTaskUpdate
event handler:
https://docs.dhtmlx.com/gantt/api__gantt_onaftertaskupdate_event.html
Please note that the tasks with the project
type ignore the date parameters (start_date
, end_date
, duration
) as they obtain them from their children. So, technically, they are not updated if you dragged their children.
When you load the data from the database, the project tasks will jump to the correct position depending on their children’s dates, regardless of what dates are saved in the database.