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

Tooltip not rendering with RadDatePicker

2 Answers 80 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Patrick Rivers
Top achievements
Rank 1
Patrick Rivers asked on 25 Feb 2008, 08:59 PM
I have an ASP.Net page with the following few controls:

<asp:ScriptManager ID="Scriptmanager1" runat="server">   
</asp:ScriptManager>  
         
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" > 
</telerik:RadDatePicker> 
         
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
         
<telerik:RadToolTipManager Position="BottomRight" ID="RadToolTipManager1" runat="server">   
 </telerik:RadToolTipManager>  

In my code behind page, if I added a tooltip to the TextBox and the RadDatePicker, then view the page in my browser, the tooltips render just fine.
protected void Page_Load(object sender, EventArgs e) 
     RadDatePicker1.ToolTip =  "Added through c#"
     TextBox1.ToolTip = "Added through c#"

If I explicitly add these controls to the tooltip manager, the textbox still renders the tooltip correctly and the RadDatePicker does not render the tool tip correctly.  The tooltip shows up as a stander HTML tooltip.
protected void Page_Load(object sender, EventArgs e) 
       RadDatePicker1.ToolTip =  "Added through c#"
       TextBox1.ToolTip = "Added through c#"
       RadToolTipManager1.TargetControls.Add(TextBox1.ID); 
       RadToolTipManager1.TargetControls.Add(RadDatePicker1.ID); 


Do you have a reason why it would work this way?  When a page only has one tool tip manager, should I be explicitly adding the controls to the manager?

Thanks in advance!

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetie
Telerik team
answered on 26 Feb 2008, 03:17 PM
Hello Joshua Laase,
Generally, when a page has only one RadToolTipManager, you can leave its TargetControls collection empty. However, please keep in mind that when you do this, you tell the manager to tooltipify every element on the page with a Title/ToolTip attribute.

In case you choose to use the TargetControls collection - you have to use the following ClientID for the RadDatePicker control:
protected void Page_Load(object sender, EventArgs e)  
{  
    RadDatePicker1.ToolTip = "Added through c#";  
    TextBox1.ToolTip = "Added through c#";  
    RadToolTipManager1.TargetControls.Add(TextBox1.ID);  
    RadToolTipManager1.TargetControls.Add(RadDatePicker1.ClientID + "_wrapper"true);  
}  

As the RadDatePicker control is a complex control, you have to tooltipify the element with that ClientID in order to have tooltipified the correct HTML element.

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Patrick Rivers
Top achievements
Rank 1
answered on 26 Feb 2008, 03:50 PM
That worked!

Thanks,

Josh
Tags
ToolTip
Asked by
Patrick Rivers
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Patrick Rivers
Top achievements
Rank 1
Share this question
or