How to set the default working time in C1GanttView with code

Posted by: malishin on 20 May 2020, 2:08 am EST

    • Post Options:
    • Link

    Posted 20 May 2020, 2:08 am EST

    I want to set the default working time to all day with code, just like setting it in the Project Information Dialog . But the following code did not work

                gv.DefaultWorkingTimes.Interval_1.Empty = false; gv.DefaultWorkingTimes.Interval_1.From = new System.DateTime(1, 1, 1, 0, 0, 0); gv.DefaultWorkingTimes.Interval_1.To = new System.DateTime(1, 1, 1, 23, 59, 59);
    
  • Posted 20 May 2020, 10:08 pm EST

    Hello,

    To set the working time for all days in code, please define the DayTimesKind and Interval for each day. Like, the following code does for Monday.```

    C1GanttView1.DefaultWorkWeek.MondayTimes.DayTimesKind = C1.Win.C1GanttView.DayTimesKind.SpecificTimes

    C1GanttView1.DefaultWorkWeek.MondayTimes.Interval_1.Empty = False

    C1GanttView1.DefaultWorkWeek.MondayTimes.Interval_1.From = New Date(1, 1, 1, 0, 0, 0, 0)

    C1GanttView1.DefaultWorkWeek.MondayTimes.Interval_1.To = New Date(1, 1, 1, 23, 59, 59, 99)

    Ruchir
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels