Tooltips created in callback won't show

4 posts, 0 answers
  1. etrich
    etrich avatar
    21 posts
    Member since:
    Aug 2005

    Posted 18 Dec 2007 Link to this post

    I'm sending you code to reproduce. It consists of a LinkButton inside an UpdatePanel. After clicking on the LinkButton, there should be a tooltip visible on mouseover for the LinkButton.
    However, tooltip will only show when removing the update panel.

    <%

    @ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <!

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <

    html xmlns="http://www.w3.org/1999/xhtml">

    <

    head runat="server">

    <title>Untitled Page</title>

    </

    head>

    <

    body>

    <form id="form1" runat="server">

    <div>

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

    </div>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate>

    <asp:Panel runat="server" ID="Panel1">

    <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>

    </asp:Panel>

    </ContentTemplate>

    </asp:UpdatePanel>

    </form>

    </

    body>

    </

    html>


    public

    partial class _Default : System.Web.UI.Page

    {

    protected void LinkButton1_Click(object sender, EventArgs e)

    {

    RadToolTip toolTip = new RadToolTip();

    toolTip.ID =

    Guid.NewGuid().ToString();

    toolTip.TargetControlID =

    "LinkButton1";

    toolTip.ShowEvent =

    ToolTipShowEvent.OnMouseOver;

    Panel1.Controls.Add(toolTip);

    }

    }

  2. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 19 Dec 2007 Link to this post

    Hi Etrich,

    The problem you experience is due to tooltip's skins not being registered on the page when using an update panel. To solve the problem you should add a link to the css file of the skin you want to use for the tooltip. However, you should have previously added the skins folder in your application. For example, if you add the skins folder in the root of your application and use Default skin, you should add this link between the head tags of the page:

    <link href="Skins/Default/ToolTip.Default.css" rel="stylesheet" type="text/css" /> 
     
    Note: The problem does not exist if you do not use ajax or register the tooltip in the aspx/ascx page or use RadAjaxPanel.

    Please, let me know if you need further assistance.

    Best wishes,
    Sophy
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. etrich
    etrich avatar
    21 posts
    Member since:
    Aug 2005

    Posted 19 Dec 2007 Link to this post

    Thank you Sophy,

    Is this something that will be fixed in a future release, or do we have to consider that workaround as permanent?

    Have a nice day
  4. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 20 Dec 2007 Link to this post

    Hi Etrich,

    First of all, I would like to point out that the problem you experience is not a bug in RadToolTip "Prometheus" control but is a normal behavior of the asp update panel. If the control is initially invisible and is shown after an ASP.NET AJAX update or is created using ASP.NET AJAX update, you should manually register all the required CSS files in the head tag of your page. Otherwise the control will not be displayed correctly.

    Do not hesitate to contact us again if you have other questions.

    All the best,
    Sophy
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top