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

Summary HTML support

3 Answers 109 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 01 Aug 2014, 02:03 AM
Is it possible to display HTML in the summary, both on the scheduler and in the popup tooltip? I understand I can use the HTML-Like Markup, but I need tables to arrange things into columns. The tooltip is the most important to me since the appointments are typically too small to show more than 2 or 3 lines of text in the scheduler.

I attached an example of what I would like to achieve.

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 05 Aug 2014, 10:24 AM
Hello Jeff,

Thank you for writing.

You can use the AppointmentFormatting event to customize the appointments appearance in RadScheduler. The supported tags for our HTML-like Text Formatting functionality would be limited to those listed from the documentation. Tables are not supported.

As to the question related to tool tips with tables I can suggest you alternatively to use a screen tip where you can insert a RadGridView instead of a table, in a RadHostItem. Here is just a sample implementation:
RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement();
RadGridView grid = new RadGridView();
 
public Form1()
{
    InitializeComponent();
 
    for (int i = 0; i < 5; i++)
    {
        this.radScheduler1.Appointments.Add(new Appointment(DateTime.Now.AddHours(i), TimeSpan.FromMinutes(20),"App" + i));
    }
  
    this.radScheduler1.ScreenTipNeeded += radScheduler1_ScreenTipNeeded;
}
 
private void radScheduler1_ScreenTipNeeded(object sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
    screenTip.MainTextLabel.Padding = new Padding(2);
    screenTip.CaptionLabel.Padding = new Padding(2);
    screenTip.CaptionLabel.Text = "Caption";
    screenTip.MainTextLabel.Text = "";
    screenTip.EnableCustomSize = true;
    RadHostItem host = new RadHostItem(grid);
    screenTip.Children.Add(host);
    screenTip.AutoSize = false;
    screenTip.Size = new Size(800,200);
 
    AppointmentElement appointmentElement = e.Item as AppointmentElement;
    if (appointmentElement != null)
    {
        //bind to appropriate collection of data to display the necessary information
        grid.DataSource = new List<IEvent>() { appointmentElement.Appointment };           
        appointmentElement.ScreenTip = screenTip;               
    }
}

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Jeff
Top achievements
Rank 1
answered on 06 Aug 2014, 10:17 PM
Desislava,

I used your suggested and added a WebBrowser. I'm still cleaning up the HTML I'm building but it's working perfectly for me. I really appreciate the help! I've attached a picture of how it looks. I supposed there's no limit to how you want the ScreenTip to look.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Aug 2014, 01:30 PM
Hello Jeff,

Thank you for writing back.

I am glad that the suggested solution is suitable for your specific case. Theoretically, there is not limit how to manipulate the screen tip content. You can add different elements in its Children collection. However, have in mind that hosting a large number of controls may affect the performance. As to the WebBrowser hosting for achieving the desired look, the solution seems to be OK. 

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

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
Scheduler and Reminder
Asked by
Jeff
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or