Scheduler Print Preview Losing AppointmentTitleFormat

4 posts, 1 answers
  1. Chance
    Chance avatar
    11 posts
    Member since:
    Apr 2015

    Posted 22 May Link to this post

    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

  2. Answer
    Dess
    Admin
    Dess avatar
    2100 posts

    Posted 23 May Link to this post

    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.
  3. Chance
    Chance avatar
    11 posts
    Member since:
    Apr 2015

    Posted 23 May in reply to Dess Link to this post

    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;
  4. Dess
    Admin
    Dess avatar
    2100 posts

    Posted 24 May Link to this post

    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.
Back to Top