Completed
Last Updated: 15 Feb 2018 08:26 by ADMIN
ADMIN
Dimitar
Created on: 11 Jul 2017 10:47
Category: Scheduler/Reminder
Type: Bug Report
0
FIX. RadScheduler - exception when ActiveViewType is TimeLine and starting a print operation with a PrintStyle.
To reproduce:
RadScheduler radScheduler1 = new RadScheduler();
public Form1()
{
    InitializeComponent();
    radScheduler1.Top += 100;
    radScheduler1.Parent = this;
    this.radSchedulerNavigator1.AssociatedScheduler = radScheduler1;
    this.radScheduler1.ActiveViewType = SchedulerViewType.Timeline;
  

    Color[] colors = new Color[]{Color.LightBlue, Color.LightGreen, Color.LightYellow,
        Color.Red, Color.Orange, Color.Pink, Color.Purple, Color.Peru, Color.PowderBlue};
    string[] names = new string[]{"Alan Smith", "Anne Dodsworth",
         "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"};
    for (int i = 0; i < names.Length; i++)
    {
        Resource resource = new Resource();
        resource.Id = new EventId(i);
        resource.Name = names[i];
        resource.Color = colors[i];
   this.radScheduler1.Resources.Add(resource);
    }

    this.radScheduler1.GroupType = GroupType.Resource;
    this.radScheduler1.ActiveView.ResourcesPerView = 2;
}

private void radButton1_Click(object sender, EventArgs e)
{
    SchedulerWeeklyCalendarPrintStyle weeklyCalendarStyle = new SchedulerWeeklyCalendarPrintStyle();
    weeklyCalendarStyle.AppointmentFont = new System.Drawing.Font("Segoe UI", 12, FontStyle.Regular);
    weeklyCalendarStyle.HeadingAreaHeight = 120;
    weeklyCalendarStyle.HoursColumnWidth = 30;

    this.radScheduler1.PrintStyle = weeklyCalendarStyle;

    this.radScheduler1.PrintPreview();
}

Workaround:
Change the view before printing.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments