Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Task Duration display in WinGanttView
posted

I'm working on a project using WinGanttView and needed to set the working hours per day down to 6.  Saw that I needed to upgrade so I've upgraded to the 10.3 version of components for WinGanttView.

I've set the TaskDurationworkingTimerPerDay property to six hours and the TaskWorkingHourMode to AutoAdjust.

 

I have Saturday and Sunday set as non working days with the other five days as working days.

 When I run my project the time shows correct but the display does not show the times in calendar correct.

Each task is set at 24 hours.  But they only cover three working days of the calendar.  The top level task shows 4 days, 24 hours divided by 6 hours so I know it is taking the working hours per day into account but it does not display correctly.  If I adjust the working hours property at runtime, the grid will adjust but the calendar doesn't redraw.  Am I doing something wrong?  What do I need to do to get the calendar to draw correctly?

 

Parents
No Data
Reply
  • 69832
    Verified Answer
    Offline posted

    The TaskDurationWorkingTimePerDay property is not applicable for tasks whose duration is expressed in hours or minutes, because those units are explicit. When the task's duration is expressed as days/weeks, the parsing logic needs to know how many hours a "day" represents, hence the TaskDurationWorkingTimePerDay property.

    Typically when you set TaskDurationWorkingTimePerDay, you also want to modify the working hours for each day of the week (see UltraCalendarInfo.DaysOfWeek collection) so that they are in sync. I believe this will solve your problem as well - if you specify 6 hours worth of working time for each day of the week whose IsWorkDay property is set to true, a 24 hour task will span four days, rather than the three it is currently spanning (since without your intervention the number of working hours per day comes out to nine).

Children