Hi there,
My problem is the same as the first post in http://www.telerik.com/community/forums/aspnet-ajax/tooltip/problems-with-onajaxload-and-radtooltipmanager.aspx, in that the tooltip keeps appearing and disappearing without ever showing its content. The original post was nearly two years ago, so I presume there is a solution now? My code (which is within a master page) is below, in case it's useful.
Regards,
Ed Graham
My problem is the same as the first post in http://www.telerik.com/community/forums/aspnet-ajax/tooltip/problems-with-onajaxload-and-radtooltipmanager.aspx, in that the tooltip keeps appearing and disappearing without ever showing its content. The original post was nearly two years ago, so I presume there is a solution now? My code (which is within a master page) is below, in case it's useful.
Regards,
Ed Graham
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent_lCol_PH" Runat="Server"> |
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="TopRight" RelativeTo="Element" Width="320px" Height="260px" Animation="Resize" Skin="WebBlue" OnAjaxUpdate="OnAjaxUpdate"> |
</telerik:RadToolTipManager> |
<!-- MAIN CONTENT CONTAINER - start --> |
<asp:Panel ID="pnlResults" runat="server" CssClass="panelScrollBar"> |
<asp:Repeater ID="rptResults" runat="server" OnItemDataBound="RptDeptsItemDataBound"> |
<ItemTemplate> |
<b><%# ((System.Data.DataRowView)Container.DataItem)["University"] %></b><br /> |
<i><%# ((System.Data.DataRowView)Container.DataItem)["Department"] %></i><br /> |
<%# ((System.Data.DataRowView)Container.DataItem)["Address"] %><br /> |
Phone: <%# ((System.Data.DataRowView)Container.DataItem)["Phone"] %><br /> |
Fax: <%# ((System.Data.DataRowView)Container.DataItem)["Fax"] %><br /> |
Website: <%# ((System.Data.DataRowView)Container.DataItem)["Website"] %><br /> |
Head of department: <%# ((System.Data.DataRowView)Container.DataItem)["HoD"] %><br /> |
<asp:LinkButton ID="lbMembersList" runat="server" OnClientClick="return false;">Full staff list</asp:LinkButton><br /><br /> |
</ItemTemplate> |
</asp:Repeater> |
</asp:Panel> |
<!-- MAIN CONTENT CONTAINER - end --> |
</asp:Content> |
protected void RptDeptsItemDataBound(object sender, RepeaterItemEventArgs e) |
{ |
if (!this.IsPostBack) |
{ |
LinkButton lbMembersList = e.Item.FindControl("lbMembersList") as LinkButton; |
DataRowView currentRow = (DataRowView)e.Item.DataItem; |
//Add the image id to the tooltip manager |
this.RadToolTipManager1.TargetControls.Add(lbMembersList.ClientID, currentRow.Row["University"].ToString(), true); |
} |
} |
protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) |
{ |
string elementID = args.Value; |
UpdatePanel up = args.UpdatePanel; |
Label lbl = new Label(); |
lbl.Text = elementID; |
up.ContentTemplateContainer.Controls.Add(lbl); |
} |