Unplanned
Last Updated: 11 Jul 2016 08:29 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 10 Jun 2016 05:41
Category: Scheduler/Reminder
Type: Bug Report
2
FIX. RadScheduler - appointments are not placed in the correct time slot when using a custom MonthTimescale
To reproduce:

public RadRibbonForm1() 
{
    InitializeComponent();

    this.radScheduler1.FocusedDate = new DateTime(2016, 1, 1);
    this.radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline;
    SchedulerTimelineView timelineView = this.radScheduler1.GetTimelineView();       
    timelineView.RangeStartDate = new DateTime(2016, 1, 1, 00, 00, 00);
    timelineView.RangeEndDate = new DateTime(2016, 12, 31, 23, 59, 59);
    timelineView.StartDate = new DateTime(2016, 1, 1, 00, 00, 00);

    Appointment appointment = new Appointment(new DateTime(2016, 1, 1, 00, 00, 00), new DateTime(2016, 1, 10, 00, 00, 00), "Quarter 1");
    Appointment appointment2 = new Appointment(new DateTime(2016, 2, 1, 00, 00, 00), new DateTime(2016, 2, 10, 00, 00, 00), "Quarter 1");
    Appointment appointment3 = new Appointment(new DateTime(2016, 4, 1, 00, 00, 00), new DateTime(2016, 4, 10, 00, 00, 00), "Quarter 2");
    Appointment appointment4 = new Appointment(new DateTime(2016, 5, 1, 00, 00, 00), new DateTime(2016, 6, 10, 00, 00, 00), "Quarter 2");
    Appointment appointment5 = new Appointment(new DateTime(2016, 7, 1, 00, 00, 00), new DateTime(2016, 7, 10, 00, 00, 00), "Quarter 3");
    Appointment appointment6 = new Appointment(new DateTime(2016, 8, 1, 00, 00, 00), new DateTime(2016, 8, 10, 00, 00, 00), "Quarter 3");
    Appointment appointment7 = new Appointment(new DateTime(2016, 11, 1, 00, 00, 00), new DateTime(2016, 11, 10, 00, 00, 00), "Quarter 4");
    Appointment appointment8 = new Appointment(new DateTime(2016, 12, 1, 00, 00, 00), new DateTime(2016, 12, 10, 00, 00, 00), "Quarter 4");

    this.radScheduler1.Appointments.Add(appointment);
    this.radScheduler1.Appointments.Add(appointment2);
    this.radScheduler1.Appointments.Add(appointment3);
    this.radScheduler1.Appointments.Add(appointment4);
    this.radScheduler1.Appointments.Add(appointment5);
    this.radScheduler1.Appointments.Add(appointment6);
    this.radScheduler1.Appointments.Add(appointment7);
    this.radScheduler1.Appointments.Add(appointment8);

    QuarterTimescale qTimeScale = new QuarterTimescale(); 
    qTimeScale.DisplayedCellsCount = 4;
    timelineView.SchedulerTimescales.Add(qTimeScale);
    this.radScheduler1.GetTimelineView().ShowTimescale(qTimeScale); 
}

class QuarterTimescale : MonthTimescale
{
    public override int ScalingFactor
    {
        get
        {
            return 3;
        }
    }

    public override string Name
    {
        get
        {
            return "Quarter";
        }
    }
}
Attached Files:
0 comments