Hi,
I have placed a RadToolTip inside a user control like this:
Most of this I got from the demo page.
The code behind has properties to allow the user to set the title and body text that will display.
When only one instance of the user control is on the page, it works just fine. But, if I have two instances of the user control on the page, only one of them will work. Is there a better way to associate the radtooltip so that I'm not trying to connect to multiple instances of the "toolTipLink" control?
I have placed a RadToolTip inside a user control like this:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ToolTipWebUserControl.ascx.cs" Inherits="WebApplication.WebUserControls.ToolTipWebUserControl" %> |
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" /> |
<div> |
<a href="#" id="toolTipLink" > |
<img src="../Images/ToolTip.gif" alt="" style="border: 0px" /></a> |
<telerik:RadToolTip runat="server" ID="RadToolTip3" |
TargetControlID="toolTipLink" ShowEvent="OnClick" IsClientID="true" OffsetY="4" OffsetX="4" HideEvent="LeaveToolTip" |
Animation="None" Position="MiddleRight" RelativeTo="Element" Skin="Telerik"> |
<div class="ToolTip"> |
<div id="toolTipTitle" runat="server" class="ToolTipTitle"><asp:Label id="ToolTipTitleLabel" runat="server" /></div> |
<hr /> |
<div> |
<asp:Label ID="ToolTipBodyLabel" runat="server" /> |
</div> |
</div> |
</telerik:RadToolTip> |
</div> |
The code behind has properties to allow the user to set the title and body text that will display.
public string ToolTipTitle |
{ |
get |
{ |
return this.ToolTipTitleLabel.Text; |
} |
set |
{ |
this.ToolTipTitleLabel.Text = value; |
} |
} |
public string ToolTipMessage |
{ |
get |
{ |
return this.ToolTipBodyLabel.Text; |
} |
set |
{ |
this.ToolTipBodyLabel.Text = value; |
} |
} |
When only one instance of the user control is on the page, it works just fine. But, if I have two instances of the user control on the page, only one of them will work. Is there a better way to associate the radtooltip so that I'm not trying to connect to multiple instances of the "toolTipLink" control?