I am having problems with the Scheduler's ScrollToTime method not working properly. It does change the scroll position, but not far enough.
I am using the Scheduler with an ActiveViewType of Day and displaying one week of data in 15 minute increments. The combinatin of RulerScale and in the control's size this displays about 10 hours of data. I am trying to get the control to scroll to a position that a normal work day is in the middle of the screen.
I am using ScrollToTime and it appears to be doing something, but does not scroll far enough. No matter what TimeSpan value I enter in the ScrollToTime method, it will only scroll the control forward about 2 hours.
I suspect that ScrollToTime attempts to determine how far (in actual distance) to scroll, but is possibly ignoring the RulerScale setting when calculating this value.
These are the values that I am using for the RadScheduler control:
SchedulerDayView WeekSchedulerDayView = WeekScheduler.GetDayView();
WeekSchedulerDayView.DayCount = 7;
WeekScheduler.HeaderFormat = "dddd";
WeekSchedulerDayView.RulerScaleSize = 10;
WeekSchedulerDayView.RulerTimeFormat = RulerTimeFormat.hours12;
WeekSchedulerDayView.WorkTime.Start = TimeSpan.Parse("08:00");
WeekSchedulerDayView.WorkTime.End = TimeSpan.Parse("17:00");
WeekSchedulerDayView.RangeFactor = ScaleRange.QuarterHour;
WeekSchedulerDayView.ShowAllDayArea = false;
SchedulerDayViewElement dayViewElement = WeekScheduler.SchedulerElement.ViewElement as SchedulerDayViewElement;
if (dayViewElement != null)
{
dayViewElement.DataAreaElement.Table.ScrollToTime(TimeSpan.Parse("18:00"));
}
I am using the Scheduler with an ActiveViewType of Day and displaying one week of data in 15 minute increments. The combinatin of RulerScale and in the control's size this displays about 10 hours of data. I am trying to get the control to scroll to a position that a normal work day is in the middle of the screen.
I am using ScrollToTime and it appears to be doing something, but does not scroll far enough. No matter what TimeSpan value I enter in the ScrollToTime method, it will only scroll the control forward about 2 hours.
I suspect that ScrollToTime attempts to determine how far (in actual distance) to scroll, but is possibly ignoring the RulerScale setting when calculating this value.
These are the values that I am using for the RadScheduler control:
SchedulerDayView WeekSchedulerDayView = WeekScheduler.GetDayView();
WeekSchedulerDayView.DayCount = 7;
WeekScheduler.HeaderFormat = "dddd";
WeekSchedulerDayView.RulerScaleSize = 10;
WeekSchedulerDayView.RulerTimeFormat = RulerTimeFormat.hours12;
WeekSchedulerDayView.WorkTime.Start = TimeSpan.Parse("08:00");
WeekSchedulerDayView.WorkTime.End = TimeSpan.Parse("17:00");
WeekSchedulerDayView.RangeFactor = ScaleRange.QuarterHour;
WeekSchedulerDayView.ShowAllDayArea = false;
SchedulerDayViewElement dayViewElement = WeekScheduler.SchedulerElement.ViewElement as SchedulerDayViewElement;
if (dayViewElement != null)
{
dayViewElement.DataAreaElement.Table.ScrollToTime(TimeSpan.Parse("18:00"));
}