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

在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;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值