二次开发的代码很简单:
1 Gantt.StartDate = DateTime.Now;
2 Gantt.EndDate = DateTime.Now.AddMonths(20);
3 Gantt.ContentWidth = 1800d;
4 Gantt.XPosition = 0;
5 Gantt.DataSource = GetTasks();
6 Gantt.OnRequestData += new RequestDataEventHandler(Gantt_OnRequestData);
2 Gantt.EndDate = DateTime.Now.AddMonths(20);
3 Gantt.ContentWidth = 1800d;
4 Gantt.XPosition = 0;
5 Gantt.DataSource = GetTasks();
6 Gantt.OnRequestData += new RequestDataEventHandler(Gantt_OnRequestData);
不定义ViewPort属性值的情况下,是自适应浏览器窗口。