We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Can schedule work week view show 7 days?

Subject pretty much sums up my question. I need to show all 7 days but I want the hour indicator to be shown as well. Can the control accomodate this?

Thanks,

Sean

1 Reply

AD Administrator Syncfusion Team April 26, 2007 10:13 AM UTC

Currently, there is no property setting that would enable this display layout. But you can get it using a ScheduleViewType.CustomWeek setting. In the sample we ship, if you add the code below to the bottom of the Form's constructor, then your initial display would show 7 days with the time column. If you need it, we could work on a sample that could try to hook up the buttons to allow the user to page in this manner. It would be a natter of incrementing or decrementing the sunday below by 7 days.


DateTime sunday = DateTime.Now;
while (sunday.DayOfWeek != DayOfWeek.Sunday)
sunday = sunday.AddDays(-1);
this.scheduleControl1.Calendar.SelectedDates.BeginUpdate();
this.scheduleControl1.Calendar.SelectedDates.Clear();
this.scheduleControl1.Calendar.SelectedDates.AddRange(
new DateTime[]{sunday, sunday.AddDays(1), sunday.AddDays(2), sunday.AddDays(3),
sunday.AddDays(4), sunday.AddDays(5), sunday.AddDays(6)});
this.scheduleControl1.Calendar.SelectedDates.EndUpdate();

this.scheduleControl1.GetScheduleHost().SwitchTo(ScheduleViewType.CustomWeek, true);

Loader.
Live Chat Icon For mobile
Up arrow icon