Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Changing text in radscheduler print

Not answered Changing text in radscheduler print

Feed from this thread
  • JJ avatar

    Posted on May 12, 2012 (permalink)

    I am starting to use the radscheduler for one of my company's project.  I would like to change the text in the print for the appointment. I tried to change the appointment.text in the event CellPrintElementFormating without any success.  Is there a way to accomplish it?

    Thanks
    JJ

    Reply

  • Ivan Todorov Ivan Todorov admin's avatar

    Posted on May 15, 2012 (permalink)

    Hello JJ,

    Thank you for writing.

    Not being able to change the appointments' text in the AppointmentPrintElementFormatting event is a known limitation and it will be improved with the next official release. For the time being, you can print custom text in your appointments by using the following approach:
    public Form1()
    {
        InitializeComponent();
        this.radScheduler1.AppointmentPrintElementFormatting += new PrintAppointmentEventHandler(radScheduler1_AppointmentPrintElementFormatting);
        this.radScheduler1.AppointmentPrintElementPaint += new PrintAppointmentPaintEventHandler(radScheduler1_AppointmentPrintElementPaint);
    }
     
    void radScheduler1_AppointmentPrintElementPaint(object sender, PrintAppointmentPaintEventArgs e)
    {
        Rectangle rect = e.Bounds;
        rect.Offset(e.AppointmentElement.StatusAreaWidth, 0);
        rect.Width -= e.AppointmentElement.StatusAreaWidth;
     
        string text = "The summary is " + e.AppointmentElement.Appointment.Summary;
        using(Brush brush = new SolidBrush(e.AppointmentElement.ForeColor))
        {
            e.Graphics.DrawString(text, e.AppointmentElement.Font, brush, rect);
        }
    }
     
    void radScheduler1_AppointmentPrintElementFormatting(object sender, PrintAppointmentEventArgs e)
    {
        e.AppointmentElement.DrawText = false;
    }

    I hope you find this useful. If you have any further questions, feel free to ask.

    Kind regards,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Scheduler and Reminder > Changing text in radscheduler print
Related resources for "Changing text in radscheduler print"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]