add update links table

Hello Dhtmlx Team,

I work with your Gantt component and I’m stuck :cry: . I want to handle the dependency links. I’m working with 2 table in my database (gantt_links and gantt_tasks).

include ('codebase/connector/gantt_connector.php');
	
	$res=mysql_connect("localhost","root","");
	mysql_select_db("gantt");
	
	$gantt = new JSONGanttConnector($res);
	
	$gantt->render_links("gantt_links","id","source,target,type");
	$gantt->render_table("gantt_tasks","id","start_date,duration,text,progress,sortorder,parent,type,assigned,coworker");

I want to edit or update dependency links between task from your lightbox and I don’t find in your doc some example to do it. I hope you will have time to help me…

Thank you.

hi,
the public api provides methods for working with links
docs.dhtmlx.com/gantt/api__gantt_getlink.html
docs.dhtmlx.com/gantt/api__gantt_updatelink.html
docs.dhtmlx.com/gantt/api__gantt_deletelink.html
docs.dhtmlx.com/gantt/api__gantt_addlink.html

And the links related to the certain task can be retreived from task.$source and task.$target properties of the task item.

There is no ready lightbox controls for managing links, so you’ll have to implement a custom one
docs.dhtmlx.com/gantt/desktop__c … ditor.html

Hi,

Thank you, I will see if it can help me…

Have a good day.