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

Tooltips created in callback won't show

3 Answers 87 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
etrich
Top achievements
Rank 1
etrich asked on 18 Dec 2007, 07:34 PM
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);

}

}

3 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 19 Dec 2007, 04:18 PM
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
0
etrich
Top achievements
Rank 1
answered on 19 Dec 2007, 04:36 PM
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
0
Sophy
Telerik team
answered on 20 Dec 2007, 08:30 AM
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
Tags
ToolTip
Asked by
etrich
Top achievements
Rank 1
Answers by
Sophy
Telerik team
etrich
Top achievements
Rank 1
Share this question
or