Hi,
I'd like the set the webweekview to be 5 days across...
Not 2 columns.
How can I do this?
WebWeekView (originally released in 2005) presents activities according to the 7-day week view layout from Outlook 2003. So as to maintain backwards compatibility with existing apps, we cannot change this layout.
In Outlook 2007, Microsoft changed the week view layout they show so it displays 5- or 7-days across. You can achieve this same look and feel by using the WebDayView control (instead of the WebWeekView control), and setting the day view's VisibleDays property to 5.
This did work for me. However, is there anyway that I can prevent showing weekends?
Or, perhaps set the start date to be a Monday, then use the visible days property of 5?
AksiaIT said:This did work for me. However, is there anyway that I can prevent showing weekends?Or, perhaps set the start date to be a Monday, then use the visible days property of 5?
Yes, exactly. You can set the ActiveDayUtc property on your WebScheduleInfo control back to the first Monday in that week.
Something like,
SmartDate localActiveDay = info1.ActiveDayUtc + info1.TimeZoneOffset;while ( localActiveDay.DayOfWeek != DayOfWeek.Monday ) { localActiveDay = localActiveDay.AddDays( -1.0);}info1.ActiveDayUtc = localActiveDay - info1.TimeZoneOffset;
Careful to avoid a one-off error because the active day as used by the controls is in UTC, but what day is displayed to the user is in Local Time (as determined by the TimeZoneOffset property setting of the WebScheduleInfo for this user.)