How can disable autoScheduling when we add link on gantt timeline

Hi,

We have our own parameters like start_date and end_date so before and after auto scheduling we have to map these fields with our parameters so that we are overriding the ‘onAfterLinkAdd’ event but after this also again auto scheduling is triggering if we add link on tiimeline which we don’t want it, how can we stop this??

Hello Govardhan,
You can disable auto-scheduling in the onBeforeLinkAdd and enable it in the onAfterLinkAdd events:
https://docs.dhtmlx.com/gantt/api__gantt_onafterlinkadd_event.html
https://docs.dhtmlx.com/gantt/api__gantt_onbeforelinkadd_event.html
In the following snippet, you can try adding a link from Task #332 to Task #333, and the latter task won’t be moved:
http://snippet.dhtmlx.com/5/f7fc434c2

However, if you want to add your custom code before and after auto-scheduling, you can do that in the onAfterAutoSchedule, onAfterTaskAutoSchedule, onBeforeAutoSchedule and onBeforeTaskAutoSchedule events:
https://docs.dhtmlx.com/gantt/api__gantt_onafterautoschedule_event.html
https://docs.dhtmlx.com/gantt/api__gantt_onbeforeautoschedule_event.html
https://docs.dhtmlx.com/gantt/api__gantt_onaftertaskautoschedule_event.html
https://docs.dhtmlx.com/gantt/api__gantt_onbeforetaskautoschedule_event.html