|
Query |
Solution |
|
define days of week which belong to working week in built-in "Work Week" view ? |
In order to add the Saturday and Sunday in WorkWeek view or define the custom days in this view, you can use the CustomWeek view type in ScheduleControl. By this schedule type, you can add the needed days using SelectedDates property. Please refer to the below code example,
Code example
this.scheduleControl1.ScheduleType = ScheduleViewType.CustomWeek;
//Clear the default dates
this.scheduleControl1.Calendar.SelectedDates.Clear();
this.scheduleControl1.Calendar.SelectedDates.AddRange(this.GetWeekDays());
//To reflect the changes in ScheduleControl.
this.scheduleControl1.GetScheduleHost().SetDataToDayPanels();
private DateTime[] GetWeekDays()
{
int count = 7;//No of days in week.
DateTime[] dates = new DateTime[7];
DateTime theDate = this.scheduleControl1.GetScheduleHost().Calendar.DateValue;
while (theDate.DayOfWeek != this.scheduleControl1.Appearance.NavigationCalendarStartDayOfWeek)
{
theDate = theDate.AddDays(-1);
}
this.scheduleControl1.GetScheduleHost().Calendar.SelectedDates.Clear();
for (int i = 0; i < count; i++)
{
dates[i] = theDate;
theDate = theDate.AddDays(1);
}
return dates;
} |
|
change grid layout in built-in (full) "Week" view in such a way that saturday and sunday will be displayed separately ? |


