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

RadToolTips Disappear on Ajax Update

1 Answer 92 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 11 Jun 2009, 06:33 PM
Hi,
I'm linking a radtooltip to a panel (actually adding panels and a corresponding radtooltip to the panel in a loop) which is placed inside of a placeholder.  On initial page load it works as expected, but when the page does an Ajax Update on a Timer Tick event, the radtooltips disappear.

code behind:
 public void ShowListings(XmlDocument doc) 
    { 
        XmlNodeList nodes = doc.GetElementsByTagName("result"); 
         
        foreach (XmlNode node in nodes) 
        { 
    Panel pnl = new Panel(); 
            pnl.Controls.Add(new LiteralControl("panel")); 
            PlaceHolder1.Controls.Add(pnl); 
 
    Telerik.Web.UI.RadToolTip rtt = new Telerik.Web.UI.RadToolTip(); 
            rtt.Width = pnl.Width; 
            rtt.ShowEvent = Telerik.Web.UI.ToolTipShowEvent.OnClick; 
            rtt.ShowCallout = true
            rtt.TargetControlID = pnl.ClientID; 
            rtt.Text = "test"
            rtt.RelativeTo = Telerik.Web.UI.ToolTipRelativeDisplay.Element; 
            rtt.Animation = Telerik.Web.UI.ToolTipAnimation.Slide; 
            rtt.Skin = "Sunset"
            rtt.OffsetY = -12; 
            rtt.HideEvent = Telerik.Web.UI.ToolTipHideEvent.ManualClose; 
            rtt.HideDelay = 100; 
            rtt.ShowDelay = 100; 
 
            PlaceHolder1.Controls.Add(rtt); 

aspx:
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>     
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline"
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="Timer1"
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" />    
                        </UpdatedControls> 
                    </telerik:AjaxSetting>                     
                </AjaxSettings> 
            </telerik:RadAjaxManager> 

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">     
    </telerik:RadAjaxPanel>

      <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Vista"/> 
 
    <asp:Panel ID="Panel1" runat="server">             
        <asp:Timer ID="Timer1" runat="server" Interval="15000" OnTick="Timer1_Tick" /> 
     </asp:Panel> 

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 15 Jun 2009, 11:48 AM
Hello John,

I am not sure why you have used both a RadAjaxPanel and a RadAjaxmanager in your code since having only one of them ensures ajax request. That is actually the reason for the problem - in order to fix it please use one of the following options:

  1. Replace the RadAjaxPanel with a standard asp panel and use the RadAjaxmanager for ajaxification as shown below:

       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="Timer1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
     
            <asp:Panel ID="RadAjaxPanel1" runat="server">  
                <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> 
            </asp:Panel> 
     
            <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Vista" /> 
            <asp:Panel ID="Panel1" runat="server">  
                <asp:Timer ID="Timer1" runat="server" Interval="4000" OnTick="Timer1_Tick" /> 
            </asp:Panel> 
  2. Remove the RadAjaxmanager declaration and simply move the timer inside the RadAjaxPanel as shown below:

       <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1">  
                <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> 
                  <asp:Panel ID="Panel1" runat="server">  
                <asp:Timer ID="Timer1" runat="server" Interval="4000" OnTick="Timer1_Tick" /> 
            </asp:Panel> 
            </telerik:RadAjaxPanel> 
            <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Vista" /> 
           

I tested both suggestion on my side and they worked as expected.

Regards,
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
John
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or