Tooltip not rendering with RadDatePicker

3 posts, 1 answers
  1. Patrick Rivers
    Patrick Rivers avatar
    8 posts
    Member since:
    Oct 2006

    Posted 25 Feb 2008 Link to this post

    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. Answer
    Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 26 Feb 2008 Link to this post

    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
  3. Patrick Rivers
    Patrick Rivers avatar
    8 posts
    Member since:
    Oct 2006

    Posted 26 Feb 2008 Link to this post

    That worked!

    Thanks,

    Josh
Back to Top