Summary HTML support

4 posts, 0 answers
  1. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 31 Jul 2014 Link to this post

    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.
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 05 Aug 2014 Link to this post

    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.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jeff
    Jeff avatar
    48 posts
    Member since:
    Apr 2012

    Posted 06 Aug 2014 in reply to Dess Link to this post

    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.
  5. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 08 Aug 2014 Link to this post

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