To reproduce: public Form1() { InitializeComponent(); for (int i = 0; i < 7; i++) { this.radScheduler1.Appointments.Add(new Appointment(DateTime.Now.AddHours(i),TimeSpan.FromHours(3),"App" + i)); } this.radScheduler1.AutoSizeAppointments = true; this.radScheduler1.ActiveViewType = SchedulerViewType.Month; SchedulerMonthView monthView = this.radScheduler1.GetMonthView(); monthView.EnableAppointmentsScrolling = true; } Workaround: set the AutoSizeAppointments property to false.
To reproduce: use the following code: public Form1() { InitializeComponent(); Appointment recurringAppointment = new Appointment(DateTime.Now, TimeSpan.FromHours(1.0), "Appointment Subject"); HourlyRecurrenceRule rrule = new HourlyRecurrenceRule(recurringAppointment.Start, 2, 10); recurringAppointment.RecurrenceRule = rrule; this.radScheduler1.Appointments.Add(recurringAppointment); } From the scheduler navigator change the time zone to any zone with "-". You will notice that some of the occurrences disappear.
Workaround: subscribe to the PanGesture event and set the StartDate property of the current view to the desired new date.
To reproduce: use the code snippet from the documentation: http://www.telerik.com/help/winforms/scheduler-views-time-zones.html SchedulerTimeZone utcPlusOneTimeZone = new SchedulerTimeZone(-60, "UTC + 1"); this.radScheduler1.GetDayView().DefaultTimeZone = utcPlusOneTimeZone; Woraround: set the time zone by using the SchedulerTimeZone.GetSchedulerTimeZones() list.
To reproduce: DateTime dtStart = DateTime.Today.AddDays(2).AddHours(10); DateTime dtEnd = DateTime.Today.AddDays(2).AddHours(12); Appointment appointment = new Appointment(dtStart, dtEnd, "TEST", "Description"); this.radScheduler1.Appointments.Add(appointment); System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ar-SA"); Try to open the edit dialog. Workaround: create a custom dialog that inherits RadSchedulerDialog and implements IEditAppointmentDialog. Thus, you will be able to handle the whole edit operation. public class Scheduler : RadScheduler { protected override IEditAppointmentDialog CreateAppointmentEditDialog() { return new MyDialog(); } public override string ThemeClassName { get { return typeof(RadScheduler).FullName; } } } public partial class MyDialog : RadSchedulerDialog, IEditAppointmentDialog { public MyDialog() { InitializeComponent(); } Appointment appointment; protected override void OnLoad(EventArgs e) { base.OnLoad(e); //an example how specify the start date RadDateTimePicker dtStart = this.Controls[0] as RadDateTimePicker; dtStart.Value = this.appointment.Start; } public void ShowRecurrenceDialog() { //ToDo } public bool EditAppointment(Telerik.WinControls.UI.IEvent appointment, Telerik.WinControls.UI.ISchedulerData schedulerData) { this.appointment = appointment as Appointment; return true; } }
To reproduce : 1. Bind RadScheduler to data base. http://www.telerik.com/help/winforms/scheduler-data-binding-data-binding-walkthrough.html 2. Specify the AppointmentMappingInfo.AllDay property to the column in your data base table. 3. When starting the application, the all day appointments are shown correctly. However, if you try to drag the all day appointment to a new time slot and save the changes to your data base, the AllDay property is not stored. Workaround: before saving the changes ,update the DataBoundItem's AllDay property: Private Sub AppointmentDropped(sender As Object, e As AppointmentMovedEventArgs) Me.RadScheduler1.DataSource.GetEventProvider().Update(e.Appointment, "AllDay") SaveScheduler() End Sub
To reproduce: follow the introduced approach in the following help article: http://www.telerik.com/help/winforms/scheduler-drag-and-drop-drag-and-drop-using-raddragdropservice.html When you maximize the form and return it to normal state, the appointment is rendered. Workaround for Timeline view: after adding the dropped appointment you can refresh the scaling: this.radSchedulerDemo.Appointments.Add(appointment); this.radSchedulerDemo.GetTimelineView().ShowTimescale(Timescales.Days);
To reproduce: Appointment app = new Appointment(DateTime.Today.AddHours(18), TimeSpan.FromHours(10), "Test"); this.radScheduler1.Appointments.Add(app); SchedulerDayView dayView = this.radScheduler1.GetDayView(); dayView.RulerStartScale = 1; dayView.RulerEndScale = 24; dayView.DayCount = 2; this.radScheduler1.EnableExactTimeRendering = true;
To reproduce: 1. Add a RadScheduler, a RadSchedulerNavigator and a RadButton. Use the following code and run the project: private void radButton1_Click(object sender, EventArgs e) { SchedulerTimelineView timelineView = radScheduler1.GetTimelineView(); this.radScheduler1.FocusedDate = new DateTime(DateTime.Now.Year,DateTime.Now.Month,1); timelineView.ShowTimescale(Timescales.Weeks); this.radScheduler1.SchedulerElement.UpdateCellContainers(); } 2. Switch to Timeline view and change the scaling to Hour. 3. Add and appointment and click the button. You will notice that the appointment is missing. Workaround: change the FocusedDate after the scaling is changed.
Add AgendaView to the winforms RadScheduler. (Seeing as the view exists in the ASP version of the RadScheduler).
To reproduce: RadScheduler radScheduler1 = new RadScheduler(); SchedulerTimelineView timelineView; public Form1() { InitializeComponent(); this.Controls.Add(radScheduler1); radScheduler1.Dock = DockStyle.Fill; Color[] colors = new Color[] { Color.LightYellow, Color.LightYellow, Color.Red, Color.LightYellow, Color.LightYellow, Color.Red, Color.LightYellow, Color.LightYellow, Color.LightYellow }; for (int i = 0; i < colors.Length; i++) { Resource resource = new Resource(); resource.Id = new EventId(i); resource.Name = "Room " + (i + 1).ToString(); resource.Color = colors[i]; this.radScheduler1.Resources.Add(resource); } radScheduler1.ActiveViewType = SchedulerViewType.Timeline; timelineView = radScheduler1.GetTimelineView(); TenMinutesTimescale tenMinutes = new TenMinutesTimescale(); timelineView.SchedulerTimescales.Add(tenMinutes); tenMinutes.Visible = true; this.radScheduler1.GroupType = GroupType.Resource; this.button1.Click += button1_Click; } public class TenMinutesTimescale : MinutesTimescale { public override int ScalingFactor { get { return 10; } } } private void button1_Click(object sender, EventArgs e) { timelineView.GetScaling().DisplayedCellsCount += 10; } Workaround: public class MyElementProvider : SchedulerElementProvider { public MyElementProvider(RadScheduler scheduler) : base(scheduler) { } protected override T CreateElement<T>(SchedulerView view, object context) { if (typeof(T) == typeof(TimelineHeader)) { return new MyTimelineHeader(this.Scheduler, view, context as SchedulerTimelineViewElement)as T; } return base.CreateElement<T>(view, context); } } public class MyTimelineHeader:TimelineHeader { public MyTimelineHeader(RadScheduler scheduler, SchedulerView view, SchedulerTimelineViewElement timeLineViewElement) : base(scheduler, view, timeLineViewElement) { } protected override SizeF ArrangeOverride(SizeF finalSize) { List<SchedulerTimescale> allSortedScale = new List<SchedulerTimescale>(); allSortedScale.Add(new SchedulerTimescale()); typeof(TimelineHeader).GetField("allSortedScales", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(this, allSortedScale); return base.ArrangeOverride(finalSize); } } public Form1() { InitializeComponent(); this.radScheduler1.ElementProvider = new MyElementProvider(this.radScheduler1); this.Controls.Add(radScheduler1); radScheduler1.Dock = DockStyle.Fill; Color[] colors = new Color[] { Color.LightYellow, Color.LightYellow, Color.Red, Color.LightYellow, Color.LightYellow, Color.Red, Color.LightYellow, Color.LightYellow, Color.LightYellow }; for (int i = 0; i < colors.Length; i++) { Resource resource = new Resource(); resource.Id = new EventId(i); resource.Name = "Room " + (i + 1).ToString(); resource.Color = colors[i]; this.radScheduler1.Resources.Add(resource); } radScheduler1.ActiveViewType = SchedulerViewType.Timeline; timelineView = radScheduler1.GetTimelineView(); TenMinutesTimescale tenMinutes = new TenMinutesTimescale(); timelineView.SchedulerTimescales.Insert(0, tenMinutes); //timelineView.SchedulerTimescales.Add(tenMinutes); tenMinutes.Visible = true; this.radScheduler1.GroupType = GroupType.Resource; this.button1.Click += button1_Click; }
If you try to set the AutoSize property to true at run time you will obtain the error illustrated on the attached screenshot.
To reproduce: - Bind the scheduler to the default SchedulerData.mdb - Add an appointment like this: this.radScheduler1.Appointments.BeginUpdate(); Appointment appointment = CreateAppointment(); this.radScheduler1.Appointments.Add(appointment); this.radScheduler1.Appointments.EndUpdate(); - Save the database
To reproduce: public Form1() { InitializeComponent(); Appointment a1 = new Appointment(new DateTime(2015, 03, 04, 10, 30, 0), TimeSpan.FromMinutes(30), "A1"); Appointment a2 = new Appointment(new DateTime(2015, 03, 04, 11, 00, 0), TimeSpan.FromMinutes(30), "A2"); Appointment a3 = new Appointment(new DateTime(2015, 03, 04, 11, 30, 0), TimeSpan.FromMinutes(30), "A3"); this.radScheduler1.Appointments.Add(a1); this.radScheduler1.Appointments.Add(a2); this.radScheduler1.Appointments.Add(a3); DateTime currentDate = new DateTime(2015, 03, 03, 09, 00, 10); this.radScheduler1.FocusedDate = currentDate; SchedulerTimelineView timelineView = radScheduler1.GetTimelineView(); timelineView.ShowTimescale(Timescales.Minutes); timelineView.RangeStartDate = currentDate.AddMonths(-3); timelineView.RangeEndDate = currentDate.AddMonths(3); timelineView.GetScaling().DisplayedCellsCount = 10; } Workaround: Use the date part only: DateTime currentDate = new DateTime(2015, 03, 03, 09, 00, 10); currentDate = currentDate.Date;
To reproduce: 1. Double click over the scheduler to open the edit dialog. 2. Click the Recurrence button. 3. Check "all day event" 4. Select Yearly recurrence pattern , every January 1st 5. Confirm the appointment. 6. Navigate to the first occurrence, select it and press Delete key. Confirm the deletion. You will see that the appointment is still visible. However, if you chose the "all day event" from the first edit dialog, everything works as expected.
It would be nice if the RadScheduler allows dragging of multiple selected appointments and change the events' start time in correspondence with the active appointment offset time.
To reproduce: Open Demo application >> Scheduler >> Printing example. Add two appointments one of which is with duration 1 hour, the other one lasts 2 hours. When you click the PrintPreview button, the shorter appointment is missing. Workaround: public Form1() { InitializeComponent(); this.radScheduler1.PrintStyle = new CustomSchedulerDailyPrintStyle(); } public class CustomSchedulerDailyPrintStyle :SchedulerDailyPrintStyle { protected override void DrawAppointments(DateTime currentDate, IResource resource, Rectangle appArea, Graphics graphics) { int rowCount = Math.Max(1, (int)Math.Ceiling((TimeEndRange - TimeSpan.FromHours(TimeStartRange.Hours)).TotalHours)); float rowHeight = (float)appArea.Height / rowCount; List<IEvent> appointments = this.GetAppointments(currentDate, false, resource); appointments.Sort(CompareAppointments); bool setColumn = true; Dictionary<IEvent, int> columns = new Dictionary<IEvent, int>(); Dictionary<IEvent, int> maxColumns = new Dictionary<IEvent, int>(); int currentColumn = 0; while (setColumn) { setColumn = false; DateTime currentTime = DateTime.MinValue; foreach (IEvent app in appointments) { if (!columns.ContainsKey(app) && DateFloor(app.Start) >= currentTime) { setColumn = true; columns.Add(app, currentColumn); currentTime = DateCeiling(app.End); } } currentColumn++; } DateTime maxEndDate = DateTime.MinValue; int lastIndex = 0; int maxColumn = 0; for (int i = 0; i <= appointments.Count; i++) { if (i == appointments.Count || DateFloor(appointments[i].Start) >= maxEndDate) { for (int j = lastIndex; j < i; j++) { maxColumns.Add(appointments[j], maxColumn); } maxColumn = 0; lastIndex = i; } if (i == appointments.Count) { break; } maxColumn = Math.Max(maxColumn, columns[appointments[i]]); if (maxEndDate < DateCeiling(appointments[i].End)) { maxEndDate = DateCeiling(appointments[i].End); } } foreach (IEvent app in appointments) { AppointmentPrintElement printedAppointment = new AppointmentPrintElement(app, this.Scheduler); printedAppointment.ShowHours = false; printedAppointment.DrawBorder = printedAppointment.DrawFill = true; float appY = appArea.Y + Math.Max(0, (float)(((DateFloor(printedAppointment.Start) - currentDate.Add(this.TimeStartRange)).TotalHours) * rowHeight)); float appBottom = appArea.Y + Math.Min(appArea.Height, (float)(((DateCeiling(printedAppointment.End) - currentDate.Add(this.TimeStartRange)).TotalHours) * rowHeight)); float appHeight = appBottom - appY - app.End.Minute; float appWidth = (appArea.Width - HoursColumnWidth) / (maxColumns[app] + 1); float appX = appArea.X + HoursColumnWidth + columns[app] * appWidth; RectangleF appRect = new RectangleF(appX, appY, appWidth, appHeight); appRect.Inflate(-2f, -2f); this.DrawAppointment(printedAppointment, graphics, appRect); } } }