Currently, it is not possible to set for example 9:30 as a start scale for the ruler in DayView and WeekView.
Description: When the appointment is moved (dragged and dropped) from one resource to another resource in Timeline view only, the AppointmentDropped event is not fired. This results in NullReferenceException in Windows 8. To reproduce: - add RadScheduler in Timeline view and use the following code: List<Appointment> appointmentlist = new List<Appointment>(); public Form1() { InitializeComponent(); this.radScheduler1.Resources.Add(new Resource { Id = new EventId("1"), Name = "Jack", Visible = true }); this.radScheduler1.Resources.Add(new Resource { Id = new EventId("2"), Name = "John", Visible = true }); this.radScheduler1.Resources.Add(new Resource { Id = new EventId("3"), Name = "John", Visible = true }); this.radScheduler1.GroupType = GroupType.Resource; this.radScheduler1.GetDayView().DayCount = 1; Random rand = new Random(); for (int i = 0; i < 20; i++) { Appointment appointment = new Appointment(DateTime.Now, TimeSpan.FromMinutes(30), "Summary", "Description"); appointment.StatusId = rand.Next(1, radScheduler1.Statuses.Count); appointment.BackgroundId = rand.Next(1, radScheduler1.Backgrounds.Count); appointment.ResourceId = radScheduler1.Resources[rand.Next(0, radScheduler1.Resources.Count)].Id; appointmentlist.Add(appointment); } this.radScheduler1.Appointments.BeginUpdate(); this.radScheduler1.Appointments.AddRange(this.appointmentlist.ToArray()); this.radScheduler1.Appointments.EndUpdate(); this.radScheduler1.AppointmentDropped += radScheduler1_AppointmentDropped; } private void radScheduler1_AppointmentDropped(object sender, AppointmentMovedEventArgs e) { MessageBox.Show("Dropped"); } Workaround: use custom DragDropBehavior as follows: this.radScheduler1.SchedulerElement.DragDropBehavior = new CustomDragDrop(this.radScheduler1.SchedulerElement); public class CustomDragDrop : AppointmentDraggingBehavior { public CustomDragDrop(SchedulerVisualElement activeOwner) : base(activeOwner) { } public override void Drop() { DateTime start = this.ActiveFeedback.Scheduler.SystemTimeZone.OffsetTime(this.ActiveFeedback.Appointment.Start, this.ActiveFeedback.View.DefaultTimeZone); DateTime end = this.ActiveFeedback.Scheduler.SystemTimeZone.OffsetTime(this.ActiveFeedback.Appointment.End, this.ActiveFeedback.View.DefaultTimeZone); IEvent ev = this.ActiveFeedback.AssociatedAppointment; bool changeResourceId = (this.Scheduler.GroupType == GroupType.Resource) && (this.ActiveFeedback.Appointment.ResourceId != this.ActiveFeedback.AssociatedAppointment.ResourceId || this.ActiveFeedback.Appointment.ResourceIds.Count != this.ActiveFeedback.AssociatedAppointment.ResourceIds.Count); AppointmentMovingEventArgs cancelArgs = (this.Scheduler.GroupType != GroupType.Resource) ? new AppointmentMovingEventArgs(start, ev) : new AppointmentMovingEventArgs(start, ev, this.ActiveFeedback.Appointment.ResourceId); this.OnAppointmentDropping(cancelArgs); this.ActiveOwner.Scheduler.GetType().GetMethod("OnAppointmentDropping", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(this.ActiveOwner.Scheduler, new object[] { cancelArgs }); if (cancelArgs.Cancel) { this.Stop(false); return; } this.ActiveFeedback.Scheduler.Appointments.BeginUpdate(); if (this.ActiveOwner as DayViewAllDayHeader != null && this.ActiveFeedback.Appointment.Duration < new TimeSpan(1, 0, 0, 0)) { start = this.ActiveFeedback.Appointment.Start.Date; end = DateHelper.GetEndOfDay(this.ActiveFeedback.Appointment.End); start = this.ActiveFeedback.Scheduler.SystemTimeZone.OffsetTime(start, this.ActiveFeedback.View.DefaultTimeZone); end = this.ActiveFeedback.Scheduler.SystemTimeZone.OffsetTime(end, this.ActiveFeedback.View.DefaultTimeZone); } this.ActiveFeedback.AssociatedAppointment.Start = start; this.ActiveFeedback.AssociatedAppointment.End = end; if (changeResourceId) { this.ActiveFeedback.AssociatedAppointment.ResourceId = this.ActiveFeedback.Appointment.ResourceId; } RadScheduler scheduler = this.ActiveOwner.Scheduler; if (scheduler.DataSource != null) { scheduler.DataSource.GetEventProvider().Update(this.ActiveFeedback.AssociatedAppointment, "Start"); scheduler.DataSource.GetEventProvider().Update(this.ActiveFeedback.AssociatedAppointment, "End"); scheduler.DataSource.GetEventProvider().Update(this.ActiveFeedback.AssociatedAppointment, "Duration"); if (changeResourceId) { scheduler.DataSource.GetEventProvider().Update(this.ActiveFeedback.AssociatedAppointment, "ResourceId"); scheduler.DataSource.GetEventProvider().Update(this.ActiveFeedback.AssociatedAppointment, "ResourceIds"); } } while (!this.ActiveFeedback.Scheduler.Appointments.IsUpdated) this.ActiveFeedback.Scheduler.Appointments.EndUpdate(true); AppointmentMovedEventArgs args = (this.Scheduler.GroupType != GroupType.Resource) ? new AppointmentMovedEventArgs(start, ev) : new AppointmentMovedEventArgs(start, ev, this.ActiveFeedback.Appointment.ResourceId); this.HideFeedbacks(); SchedulerUIHelper.SelectAppointment(this.Scheduler, ev, true, false); this.OnAppointmentDropped(args); this.ActiveOwner.Scheduler.GetType().GetMethod("OnAppointmentDropped", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(this.ActiveOwner.Scheduler, new object[] { args }); } }
To reproduce: - add RadScheduler with several appointments and use the folllowing code: SchedulerDayView dayView = this.radScheduler1.GetDayView(); dayView.RangeFactor = ScaleRange.QuarterHour; dayView.RulerStartScale = 7; dayView.RulerEndScale = 18; Ensure that you have appointments with start before 7 AM and appointments with start after 18 PM. All appointments with start before 7 AM are displayed at the top of the view, but all appointments with start after 18 PM are not displayed. Workaround: public Form1() { InitializeComponent(); for (int i = 0; i < 20; i++) { Appointment appointment = new Appointment(DateTime.Now.AddHours(12 + i), TimeSpan.FromMinutes(30), "Summary", "Description"); appointment.StatusId = 2; appointment.BackgroundId = 6; this.radScheduler1.Appointments.Add(appointment); } SchedulerDayView dayView = this.radScheduler1.GetDayView(); dayView.RangeFactor = ScaleRange.QuarterHour; dayView.RulerStartScale = 7; dayView.RulerEndScale = 18; this.radScheduler1.AppointmentElementFactory = new CustomAppointmentElementFactory(); } public class CustomAppointmentElementFactory : IAppointmentElementFactory { AppointmentElement IAppointmentElementFactory.CreateAppointmentElement(RadScheduler scheduler, SchedulerView view, IEvent appointment) { return new CustomAppointmentElement(scheduler, view, appointment); } } public class CustomAppointmentElement : AppointmentElement { public CustomAppointmentElement(RadScheduler scheduler, SchedulerView view, IEvent appointment) : base(scheduler, view, appointment) { } protected override void OnParentChanged(Telerik.WinControls.RadElement previousParent) { base.OnParentChanged(previousParent); if (this.Scheduler.ActiveViewType == SchedulerViewType.Day) { if (this.Start.Hour > this.Scheduler.GetDayView().RulerEndScale) { this.Start = this.Start.Date.AddHours(this.Scheduler.GetDayView().RulerEndScale).AddMinutes(-(int)this.Scheduler.GetDayView().RangeFactor); } } } }
1. In Day View, add an appointment for Thursday Jan 30 3. Click the Print Preview button 4. Click on the Print Settings dialog 5. Now change the Print style to Weekly. Note that the DateRange now changes to Jan 27 - Feb 2. 6. Now change the Print style to Monthly. Note that the DateRange now changes to Jan 26 - Feb 2, whereas it should be Jan 26 to Feb 2, since the default week count is 4
EnableExactTimeRendering property should get or set a value indicating whether the appointment start and end time should be rendered exactly.
To reproduce: Add an appointment with the text "<html><size=9>Erin Swardz</br><color=Red>PO 2315</html>" the appointment looks formatted in the scheduler, however when in PrintPreview/Print the html code is printed in raw format Workaround: Strip all html in order to print pure text - void scheduler_AppointmentPrintElementFormatting(object sender, PrintAppointmentEventArgs e) { string replaceBr = e.AppointmentElement.Text.Replace("</br>", " "); string result = Regex.Replace(replaceBr, @"<[^>]*>", string.Empty); e.AppointmentElement.Text = result; }
Paint event should be thrown when a SchedulerCellElement is painting.
Let's say that you have an appoiment that starts at 8:30 and ends at 8:30. RadScheduler will display it as it should, but it will not be considered by the printing functionality. We should also have in mind the case where there are several appointments starting from 8:30 and ending at 8:30.
Currently if there are several appointments with equal start date, their order in TimelineView for example cannot be defined via a custom sort comparer.
Recurring event for last weekday of June does not appear in 2013.
Improve property change notifications in day view grouped by resource.
Add scroll bar to the all day area in the Day/Week/WorkWeek views
To reproduce: Create a SQL table as per this article - http://www.telerik.com/help/winforms/scheduler-data-binding-using-datasource-property.html . Add the following mappings using EntityFramework or OpenAccess - http://www.telerik.com/help/winforms/scheduler-data-binding-using-datasource-property.html. You will notice that the resources cannot be mapped. Workaround: Implement a One-to-Many relation by adding a ResourceId column in the database and removing the old table. Resolution: Both EF and TDA mappings work. Due to the differences in the mechanisms of the two products there are some slight adjustments that need to be made. Below is how to set up the mappings with EF and in commented code for ORM. SchedulerDataEntities1 entityContext = new SchedulerDataEntities1();
Similar to Outlook, the user should be able to set how long before the start of each appointment the reminder should notify him/her.
To reproduce: 1. Have a scheduler grouped by resource 2. On a button click call its PrintPreview method 3. Open the print settings dialog 4. Select Weekly Style 5. Select Grouped by: Resource 6. Select Two pages per week at this point, exception is thrown Workaround: protected override void OnLoad(EventArgs e) { base.OnLoad(e); AddScheduler(); radScheduler1.PrintSettingsDialogFactory = new MyFactory(); } private void radButton1_Click(object sender, EventArgs e) { radScheduler1.PrintPreview(); } class MySchedulerPrintSettingsDialogFactory : SchedulerPrintSettingsDialog { SchedulerPrintStyleSettings userControl; RadDropDownList groupBy; RadDropDownList twoPagesPerView; RadDropDownList printStyle; public MySchedulerPrintSettingsDialogFactory(RadPrintDocument document) : base(document) { } protected override Control CreateFormatControl() { userControl = base.CreateFormatControl() as SchedulerPrintStyleSettings; RadGroupBox groupBox = userControl.Controls["groupBoxStyleSettings"] as RadGroupBox; groupBy = groupBox.Controls["dropDownGroupBy"] as RadDropDownList; groupBy.SelectedIndexChanged += groupBy_SelectedIndexChanged; twoPagesPerView = groupBox.Controls["dropDownLayout"] as RadDropDownList; twoPagesPerView.SelectedIndexChanging += twoPagesPerView_SelectedIndexChanging; RadGroupBox groupBoxMain = userControl.Controls["groupBoxPrintStyle"] as RadGroupBox; printStyle = groupBoxMain.Controls["dropDownPrintStyle"] as RadDropDownList; printStyle.SelectedValueChanged += printStyle_SelectedValueChanged; return userControl; } void printStyle_SelectedValueChanged(object sender, EventArgs e) { if (printStyle.SelectedItem.Text == "Weekly Style") { twoPagesPerView.SelectedItem = twoPagesPerView.Items[0]; } } void twoPagesPerView_SelectedIndexChanging(object sender, Telerik.WinControls.UI.Data.PositionChangingCancelEventArgs e) { if (groupBy.SelectedItem.Text == "Resource" && e.Position == 1) { e.Cancel = true; RadMessageBox.Show("Two pages per view is not supported in GroupBy:Resource mode"); } } void groupBy_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) { if (groupBy.Items[e.Position].Text == "Resource") { twoPagesPerView.SelectedItem = twoPagesPerView.Items[0]; } } } class MyFactory : IPrintSettingsDialogFactory { public Form CreateDialog(RadPrintDocument document) { return new MySchedulerPrintSettingsDialogFactory(document); } }
To reproduce: Add a Resource to RadScheduler: Resource res = new Resource(); res.Id = new EventId(199); res.Name = "John Doe"; radScheduler1.Resources.Add(res); Create a new appointment and set the resource: Appointment app = new Appointment(); app.Start = DateTime.Now; app.End = app.Start.AddHours(1); app.BackgroundId = 3; app.ResourceId = new EventId(199); radScheduler1.Appointments.Add(app); Subscribe to the CollectionChangedEvent: void Appointments_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e) { if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.ItemChanged) { Debug.WriteLine("Property Changed = " + e.PropertyName); } } Run the application, open the appointment and click ok. You will notice that the event will fire. It should not fire since the EventId is the same. Workaround: Create a custom appointment following this article: http://www.telerik.com/help/winforms/scheduler-appointments-and-dialogs-adding-a-custom-field-to-the-editappointment-dialog.html and override the ResourceId property: public class App : Appointment { public override EventId ResourceId { get { return base.ResourceId; } set { if (!Object.Equals(this.ResourceId, value)) { base.ResourceId = value; } } } }
To reproduce: 1. Create a new Form 2. Add a Scheduler control and set Dock to Dock.Fill 3. Run the form 4. Add an appointment to the scheduler 5. Right-click the newly added appointment and start dragging it to move the appointment 6. Let go of the mouse button to drop You will notice that the appointment will not be dropped and the context menu will show. A correct behavior should be chosen. Workaround: Stop the appointments from dragging with right-mouse: MouseButtons lastButton; void scheduler_MouseDown(object sender, MouseEventArgs e) { this.lastButton = e.Button; } void DragDropBehavior_Starting(object sender, RadServiceStartingEventArgs e) { e.Cancel = lastButton == System.Windows.Forms.MouseButtons.Right; }
Let's say that we have the common scenario of loading appointments and resources in RadScheduler. For this purpose we have three tables - Appointments, Resources and AppointmensResources. Normally, (ADO.NET) we have three TableAdapters that fill our tables with data. However, currently we should order them like this: Resources, AppointmentsResources and Appointments. Otherwise, RadScheduler will not be able to load the resources for the existing appointments. CLOSED: The AppointmentsResources table is not assigned anywhere to the scheduler so there is nothing it can notify when filled. However the table is needed in order to resolve the relations between appointments and resources. Therefore, it should be filled before the Appointments table or you can rebind the scheduler by using its DataBind method after you have filled all the tables.
If an appointment is about to change its resource, e.NewResourceId in the AppointmentDropping event should return the id new the new appointment. However, it returns nothing.
Currently, a time range of working ours is valid for all days in the week. There could be a rule that sets a specific range for some days of the week, leaving another range of hours for the rest of the days.