Show 7 days (or adjustable subset) in Work Week View
Hi,
I need to show a schedule in a view similar to Work Week, i.e. the full day one per column for several successive days. However I ideally want to show the whole week.
Is there any way to set the control to show 7 days, including the weekends? I have found reference to a WorkingDays property in other non-desktop implementations, but I can't see how to access this in WinForms.
Alternatively, if the control is strictly limited to 5 days in Work Week view, how do I set the working days and start day, so I can "scroll left and right" through the week? Again I have found references to a FirstDayOfWorkingWeek property, but can't see how that is implemented in Winforms.
Thanks
Andrew
Hi Andrew Johnston,
We have investigated the scenario you reported. By default, the ScheduleControl displays the work week starting on Monday, which aligns with the standard work week. However, we are currently exploring possible ways to meet your requirement and need some time to validate. We will provide further updates on or before October 13, 2025.
Regards,
Rabina M
Andrew Johnston,
We have reviewed the reported scenario regarding displaying a full week including weekends, in a view similar to the Work Week and to set the start day of the week.
Your requirement can be achieved by setting the ScheduleType to CustomWeek and manually specifying the selected dates to include all seven days of the week along with the start day. This approach allows you to display each day as a separate column, similar to the Work Week view.
Code snippet for CustomWeek to include 7 days:
|
this.scheduleControl1.ScheduleType
= ScheduleViewType.CustomWeek; this.scheduleControl1.Appearance.AllowProportionalColumnSizing = true; this.scheduleControl1.Calendar.SelectedDates.BeginUpdate(); this.scheduleControl1.Calendar.SelectedDates.Clear(); for (int i = 0; i < 7; i++) { // Add 7 days and start day. this.scheduleControl1.Calendar.SelectedDates.Add(DateTime.Now.StartOfWeek(DayOfWeek.Sunday).AddDays(i)); } this.scheduleControl1.Calendar.SelectedDates.EndUpdate();
public static class Extensions { public static DateTime StartOfWeek(this DateTime dt, DayOfWeek startOfWeek) { int diff = (7 + (dt.DayOfWeek - startOfWeek)) % 7; return dt.AddDays(-1 * diff).Date; } } |
Image reference of Custom week with 7 days:
Find the sample demo
in the attachment.
Please let us know if you need any further assistance.
Attachment: ScheduleControlDemo_e0b54d21.zip
- 2 Replies
- 2 Participants
-
AJ Andrew Johnston
- Oct 8, 2025 09:49 AM UTC
- Oct 13, 2025 09:54 AM UTC