Source code of the tutorial is available for download.
This example shows how to load task links.
C#
public class GanttController : Controller { public ActionResult Backend() { return new Gantt().CallBack(this); } class Gantt : DayPilotGantt { protected override void OnInit(InitArgs e) { StartDate = new DateTime(2014, 10, 1); Days = 60; LoadTasks(); LoadLinks(); UpdateWithMessage("Welcome!"); } // ... private void LoadLinks() { LinksFromEnumerable( Db.GetLinks().Rows, new LinkFieldMappings() { IdField = "id", FromField = "from", ToField = "to", TypeField = "type" }); } } }
VB
Public Class GanttController Inherits Controller Public Function Backend() As ActionResult Return (New Gantt()).CallBack(Me) End Function Private Class Gantt Inherits DayPilotGantt Protected Overrides Sub OnInit(ByVal e As InitArgs) StartDate = New Date(2014, 10, 1) Days = 60 LoadTasks() LoadLinks() UpdateWithMessage("Welcome!") End Sub Private Sub LoadLinks() LinksFromEnumerable(Db.GetLinks().Rows, New LinkFieldMappings() With { .IdField = "id", .FromField = "from", .ToField = "to", .TypeField = "type"}) End Sub End Class End Class