您的位置:首页 > 其它

ILOG 甘特图 ActivityTable 去掉自动属性及其他

2018-02-28 16:55 369 查看
在designer.cs文件中,自定义列之前加上`

this.activityTable1.Columns.Clear();

部分代码:

this.activityTable1.Columns.Clear();
this.activityTable1.Columns.AddRange(new ILOG.Views.Windows.Forms.TableColumn[] {
this.tableColumn_CompleteState,
this.tableColumn11,
this.infoColumn1,
this.treeColumn1,
this.tableColumn15,
this.tableColumn19,
this.tableColumn10,
this.tableColumnDesign,
this.tableColumn17,
this.tableColumn3,
this.tableColumn4,
this.tableColumn37,
this.tableColumn2,
this.tableColumn5,
this.tableColumn13,
this.tableColumn12,
this.tableColumn14,
this.tableColumn16,
this.tableColumn18,
this.tableColumn20});


自定义simGantModel

this.simpleGanttModel.CustomActivityProperties.Add("RealStartTime", typeof(System.DateTime), System.DateTime.Now);
this.simpleGanttModel.CustomActivityProperties.Add("RealEndTime", typeof(System.DateTime), System.DateTime.Now);
this.simpleGanttModel.CustomActivityProperties.Add("Level", typeof(string), "");


适配器表名:

//
// genericGanttModelAdapter
//
this.genericGanttModelAdapter.ActivitiesTableName = "表名";
this.genericGanttModelAdapter.ActivityIDColumnName = "BAID";
this.genericGanttModelAdapter.ActivityParentIDColumnName = "PID";
this.genericGanttModelAdapter.ActivityProperties.Add(new ILOG.Views.Gantt.Data.GenericGanttModelAdapter.ColumnMapping("PName", "Name"));
this.genericGanttModelAdapter.ActivityProperties.Add(new ILOG.Views.Gantt.Data.GenericGanttModelAdapter.ColumnMapping("Durations", "Duration"));
this.genericGanttModelAdapter.ActivityProperties.Add(new ILOG.Views.Gantt.Data.GenericGanttModelAdapter.ColumnMapping("StartTime", "StartTime"));
this.genericGanttModelAdapter.ActivityProperties.Add(new ILOG.Views.Gantt.Data.GenericGanttModelAdapter.ColumnMapping("CompleteTime", "EndTime"));
this.genericGanttModelAdapter.ActivityProperties.Add(new ILOG.Views.Gantt.Data.GenericGanttModelAdapter.ColumnMapping("RealStartTime", "RealStartTime"));
this.genericGanttModelAdapter.ActivityProperties.Add(new ILOG.Views.Gantt.Data.GenericGanttModelAdapter.ColumnMapping("RealEndTime", "RealEndTime"));
this.genericGanttModelAdapter.AutoMilestone = true;
this.genericGanttModelAdapter.ConstraintFromActivityIDColumnName = "约束列名";
this.genericGanttModelAdapter.ConstraintsTableName = "前置表名";
this.genericGanttModelAdapter.ConstraintToActivityIDColumnName = "被约束的列名";
this.genericGanttModelAdapter.GanttModel = this.simpleGanttModel;
this.genericGanttModelAdapter.ResourceIDColumnName = "资源列名";
this.genericGanttModelAdapter.ResourceParentIDColumnName = "资源ID";
this.genericGanttModelAdapter.ResourcesTableName = "资源表";


列控件:

private ILOG.Views.Gantt.Windows.Forms.InfoColumn infoColumn1;
private ILOG.Views.Windows.Forms.TreeColumn treeColumn1;
private ILOG.Views.Windows.Forms.TableColumn tableColumn2;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ILOG Ganttle
相关文章推荐