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

Scheduler Print Preview Losing AppointmentTitleFormat

3 Answers 18 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Chance
Top achievements
Rank 1
Chance asked on 22 May 2017, 02:26 PM

Is there a way to set the AppointmentTitleFormat for the scheduler's Print View? 

I would like the printed copy to have the data displayed the same as on the scheduler's view but its not using the AppointmentTitleFormat I have set for the control.

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 May 2017, 09:33 AM
Hello Chance, 

Thank you for writing.  
 
You can subscribe to the AppointmentPrintElementFormatting event and customize the PrintAppointmentEventArgs.AppointmentElement.Text according to your requirement. Additional information about customizing the print elements is available in the following help article: http://docs.telerik.com/devtools/winforms/scheduler/print-support/events-and-customization
 
I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Chance
Top achievements
Rank 1
answered on 23 May 2017, 02:11 PM

That worked thanks!  Other issue I'm having with this now is trying to get the HTML to work.  I tried setting the EnableHtmlTextRending property for that event and also tried the other events from the documentation but none of them worked.  This is what I'm setting as the text.

 

e.AppointmentElement.Text = time + "<b>" + t + "</b><br />" + sx;
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 May 2017, 08:41 AM
Hello Chance, 

Thank you for writing back. 

In order to display HTML-like text in the print preview dialog, it is necessary to set the AppointmentElement.EnableHtmlTextRendering property to true in the AppointmentPrintElementFormatting event. In addition, the text must starts with "<html>". Here is a sample code snippet: 
private void radScheduler1_AppointmentPrintElementFormatting(object sender, PrintAppointmentEventArgs e)
{
    e.AppointmentElement.EnableHtmlTextRendering = true;
    e.AppointmentElement.Text = "<html> " + e.AppointmentElement.Appointment.Start.Date + "<b>"
        + e.AppointmentElement.Appointment.Start.TimeOfDay + "</b><br />";
}

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler and Reminder
Asked by
Chance
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Chance
Top achievements
Rank 1
Share this question
or