I'm looking at your new GanttView control. It looks great. However I can not understand how to make weekend days unused within task duration. Saturday and Sunday is grayed on time line but not considered as weekends. I create task which starts at Friday and has duration 2 days. I suppose that it ends at Monday because calendarInfo attached to ganttView considered (by default) Saturday and Sunday as weekend but task ends at Saturday. It is confusing and unnatural (after people have used MS Project). Weekends (calendar days with IsWorking = false) must not be counted for task duration.
Same problem with holidays. Currently they also counted as working days.
Implementing these behaviour you should consider another nuance. In Russia (not sure about other countries) if holiday is on thursday then thursday and friday will be nonworking days but sunday will be working day. Also if holiday is on tuesday then tuesday and monday will be nonworking days but saturday will be working day. If holiday is on weekend then monday will be nonworking day.
Of course this specific with holidays should not be explicitely implemented in GanttView or CalendarInfo. I suppose that should be ablility to set concrete date as working or nonworking and weekends and holidays should be initially counted as nonworking.
Thank you Brian.
We need to set as working not every Saturday but only single concrete Saturday. For example April 3, 2010.
How to do it?
Sorry, I guess I failed to make my point clearly. You can designate any day of the week as a working or non-working day, as demonstrated by the following code sample:
// Make Thursday and Friday non-working daysList<System.DayOfWeek> nonWorkingDays = new List<System.DayOfWeek>();nonWorkingDays.Add(System.DayOfWeek.Thursday);nonWorkingDays.Add(System.DayOfWeek.Friday);SetNonWorkingDays( this.calendarInfo, nonWorkingDays );
static private void SetNonWorkingDays( UltraCalendarInfo calendarInfo, List<System.DayOfWeek> nonWorkingDays ){ DaysOfWeekCollection daysOfWeek = calendarInfo.DaysOfWeek;
// Iterate all days of the week and set the IsWorkDay property based // on whether a corresponding entry exists in the specified list of // non-working days. foreach( Infragistics.Win.UltraWinSchedule.DayOfWeek dayOfWeek in daysOfWeek ) { System.DayOfWeek dow = (System.DayOfWeek)dayOfWeek.DayOfTheWeek; dayOfWeek.IsWorkDay = nonWorkingDays.Contains(dow) == false; }}
"...or add members to the WorkingHours collection"
Do you mean that I could add WorkingHours to set weekend as working day? It is acceptable for us but better we could explicitly set specific weekend as working day. I mean something like this:
calendarInfo.GetDay(<weekendDate>, true).IsWorkDay = true;
If Day.IsWorkDay property was not set explicitly it must inherits from corresponding calendarInfo.DaysOfWeek or calendarInfo.Holidays.
Or you can implement calendarInfo.WorkingDays property but it seems to me superfluous.
One more thought about nonworking day. In MS Project task's bar goes through nonworking days and has same appearance within it as within working days. It would be great if you allow to set specific bar's appearance for nonworking days.
To be honest we ran out of time. That feature will be available in a future release.
Note that the ability to arbitrarily designate working days/hours already exists; see the UltraCalendarInfo.DaysOfWeek collection, which exposes DayOfWeek objects off of which you can set the IsWorkDay property or add members to the WorkingHours collection.