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

RadToolTipManager not working with OnAjaxUpdate

1 Answer 136 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 25 Feb 2009, 07:14 PM
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

<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); 
    } 

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 27 Feb 2009, 10:19 AM
Hello Ed,

I already answered your other thread and for your convenience I pasted my reply below:

I am not quite sure what is the exact problem but I believe that you can achieve your goal with the current version of RadToolTipManager. As far as I understood from the linked thread the problem comes from the fact that there is an update panel and also you use the ajax load on demand functionality of RadToolTipManager. If so, the only problem I can think of is that when you try to load the content of the tooltip by using ajax, the outside update panel also updates. If so, you can try setting the outer update panel's UpdateMode property to Conditional and test again.

If this does not help, please prepare and send me a sample, fully runnable reproduction demo and I will do my best to help. You can also examine the following online demo which has a tooltipified and ajaxified grid:

http://demos.telerik.com/aspnet-ajax-beta/tooltip/examples/targetcontrolsandajax/defaultcs.aspx

I am looking forward to hearing from you soon.


Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
ToolTip
Asked by
Ed
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or