Adding link programatically without triggering event

I have a simple question:

How can I add a link without triggering the link related events for example “onAfterLinkAdd”. I would like the behavior to be similar to gantt.parse method because it seems that it doesn’t trigger onAfterLinkAdd event.

10x in advance.

Hi @Nikolai_Dimentiev !

You can just use gantt.parse then.
It will add the link you provide to the gantt, the data that has been loaded previously won’t be cleared. Don’t forget to add data:[] to the object :

gantt.parse({ data:[], links: [ { your link object } ] })

Here is the sample how does it work:

@guldmi are u a part of the dhtmlx gantt team? :slight_smile:

@Nikolai_Dimentiev yes