10791 : Databound links with different types

Question

Question:Using code:< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

{

  gantt1.TimeItemLinks.NameInDS_StartKey=”start”;

  gantt1.TimeItemLinks.NameInDS_TargetKey=”target”;

  gantt1.TimeItemLinks.DataSource=currentProject.WorkLinks;

}

loads the relationships… however type relationship is used one and one, which is installed in property Gantt1.TimeItemLinks.CreationTimeItemLinkStyle…

How fasten the type of the relationships to field database?

Thank you.

Answer

When the links are loaded they will be handled by the gantt1.TimeItemLinks.LinkDataConnect class.

This class has events like OnBeforeDSToLink. You can implement this event and change the link type based on the data provided in the arguments (or data you can access having the arguments as a context).

 

Currently Link Databind is not documented in the help file. The Link Databind is officially release with version 3.0 due soon.

Read this article to get an overview of link-databind https://plexityhide.com/GTPNETOverview.htm