TooltipManager with DayRender

3 posts, 1 answers
  1. Eric
    Eric avatar
    24 posts
    Member since:
    Jan 2008

    Posted 02 Mar 2011 Link to this post

    Hi,

    I am trying to show the tooltips of a special day with tooltip manager.

    I am trying to follow the below example:
    http://demos.telerik.com/aspnet-ajax/tooltip/examples/tooltipcalendar/defaultcs.aspx

    I have the following code in page load and day render
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RadCalendarDay day = new RadCalendarDay();
            day.Date = new DateTime(2011, 3, 25);
            day.ToolTip = "Test <br /> Test.";        
            cal.SpecialDays.Add(day);               
        }
    }
     
    protected void cal_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
    {
        if(e.Day.Date == new DateTime(2011, 3, 25)){
            TableCell cell = e.Cell;
            cell.Attributes.Add("id", cal.ClientID + e.Day.Date.Day.ToString());
            ttMngr.TargetControls.Add(e.Cell.Attributes["id"], true);
        }
    }

    I also have the following items in the aspx page
    <telerik:RadAjaxLoadingPanel ID="loading" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>   
    <telerik:RadToolTipManager ID="ttMngr" runat="server" Width="230px" Height="300px" RelativeTo="Element" >
    </telerik:RadToolTipManager>
    <telerik:RadAjaxPanel ID="ajaxPnl" runat="server" LoadingPanelID="loading">
       <telerik:RadCalendar ID="cal" runat="server" ondayrender="cal_DayRender">
       </telerik:RadCalendar>
    </telerik:RadAjaxPanel>

    But when I hover over the day it doesn't show the tooltip with the tooltip manager, a regular tooltip opens.

    What am I missing here?

    Thank you...
  2. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 08 Mar 2011 Link to this post

    Hi Eric,


    Please find attached a runnable example which represents the required functionality. Test it on your side and verify if it works for you.


    Best wishes,
    Maria Ilieva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eric
    Eric avatar
    24 posts
    Member since:
    Jan 2008

    Posted 08 Mar 2011 Link to this post

    Hi Maria,

    The problem is gone when RadTooltipManager is moved under RadCalendar. Your example also works.

    Thank you...
Back to Top