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

TooltipManager with DayRender

2 Answers 70 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 02 Mar 2011, 06:34 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Maria Ilieva
Telerik team
answered on 08 Mar 2011, 01:00 PM
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!
0
Eric
Top achievements
Rank 1
answered on 08 Mar 2011, 02:08 PM
Hi Maria,

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

Thank you...
Tags
Calendar
Asked by
Eric
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Eric
Top achievements
Rank 1
Share this question
or