This is a migrated thread and some comments may be shown as answers.

Print setting for radscheduler

7 Answers 77 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Sina
Top achievements
Rank 1
Sina asked on 25 Jul 2018, 03:25 PM
Hi
Could you help me how to customize scheduler print setting dialog. i need to to change the culture of two calendars in print setting dialog(they have been highlighted in my attached file).

7 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Jul 2018, 01:46 PM
Hello, Sina,    

In order to change the culture of the start/end RadDateTimePicker controls in the print settings dialog, you can 
use a custom SchedulerPrintSettingsDialog and override its OnLoad method where you can specify the desired culture. For this purpose it is necessary to create a  custom SchedulerPrintSettingsDialogFactory as follows:

public RadForm1()
{
    InitializeComponent(); 
    this.radScheduler1.PrintSettingsDialogFactory = new CustomSchedulerPrintSettingsDialogFactory();
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    this.radScheduler1.PrintPreview();
}
 
public class CustomSchedulerPrintSettingsDialogFactory : IPrintSettingsDialogFactory
{
    public Form CreateDialog(RadPrintDocument document)
    {
        return new CustomSchedulerPrintSettingsDialog(document);
    }
}
 
public class CustomSchedulerPrintSettingsDialog : SchedulerPrintSettingsDialog
{
    public CustomSchedulerPrintSettingsDialog(RadPrintDocument document) : base(document)
    {
    }
 
    SchedulerPrintStyleSettings printStyleSettingControl;
 
    protected override Control CreateFormatControl()
    {
        printStyleSettingControl = base.CreateFormatControl() as SchedulerPrintStyleSettings;
        return printStyleSettingControl;
    }
 
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        RadDateTimePicker startDTP = printStyleSettingControl.Controls["groupBoxPageRange"].Controls["datePickerStartDate"] as RadDateTimePicker;
        startDTP.Culture = new System.Globalization.CultureInfo("bg-BG");
        RadDateTimePicker endDTP = printStyleSettingControl.Controls["groupBoxPageRange"].Controls["datePickerEndDate"] as RadDateTimePicker;
        endDTP.Culture = new System.Globalization.CultureInfo("bg-BG");
    }
}

I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Sina
Top achievements
Rank 1
answered on 30 Jul 2018, 02:36 PM
Thanks Dess for your useful info. but i have one more question, first day in my radscheduler starts at Saturday. however, when i open it in print review (weekly style ), it starts from Monday. how can i change it to Saturday?
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 Jul 2018, 11:36 AM
Hello, Sina,    

The SchedulerWeeklyPrintStyle allows you to specify from which day the week starts by the FirstDayOfWeek property:

SchedulerWeeklyPrintStyle schedulerPrintStyle = new SchedulerWeeklyPrintStyle();
schedulerPrintStyle.FirstDayOfWeek = DayOfWeek.Tuesday;
this.radScheduler1.PrintStyle = schedulerPrintStyle;
this.radScheduler1.PrintPreview();



I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sina
Top achievements
Rank 1
answered on 31 Jul 2018, 05:32 PM

Thanks Dess...
you makes me more curious to learn more details about print preview.
for my print preview is set the DrawPageTitleCalendar property to true.
DrawPageTitleCalendar = true;

But i do not really know how i can change the font of page title calendar?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 01 Aug 2018, 12:37 PM
Hello, Sina,    

You can change the font of the calendar displayed in the print document by handling the RadScheduler.PrintElementFormatting event. Here is a sample code snippet:

Font f = new Font("Arial", 12f, FontStyle.Italic);
 
private void radScheduler1_PrintElementFormatting(object sender, PrintElementEventArgs e)
{
    if (e.PrintElement is CalendarPrintElement)
    {
        e.PrintElement.Font = f;
    }
}




Additional information about customizing the print elements is available in the following help article: https://docs.telerik.com/devtools/winforms/scheduler/print-support/events-and-customization

I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
gorp88
Top achievements
Rank 1
Veteran
answered on 24 Jul 2020, 04:32 PM

Hi,

How do I add dynamic text to PageTitle property of radscheduler export PDF. I can't add line breaks or new lines for my text. It always put the text in a single line. Any suggestions ?

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Jul 2020, 07:01 AM
Hello, Shiraz,

I would like to note that RadScheduler from the Telerik UI for WinForms suite doesn't offer export to PDF functionality. It supports exporting to ICalendar format or export to a custom file:
https://docs.telerik.com/devtools/winforms/controls/scheduler/importing-and-exporting-appointments/export-to-icalendar 
https://docs.telerik.com/devtools/winforms/controls/scheduler/importing-and-exporting-appointments/export-to-a-custom-file  

As to the printing functionality, please have in mind that RadDocument allows you to specify different headers (left, right, center). Thus, you can display title for each page. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/printing-support/radprintdocument/header-and-footer 

I hope this information helps. 

 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Tags
Scheduler and Reminder
Asked by
Sina
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Sina
Top achievements
Rank 1
gorp88
Top achievements
Rank 1
Veteran
Share this question
or