Ajax ToolTipManager inside a RadAjaxPanel

6 posts, 0 answers
  1. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 16 Aug 2007 Link to this post

    Hi,

    I have a RadToolTipManager with OnAjaxUpdate set.  This Control sits inside a RadTabStrip with AutoPostBack='true' and MultiPage RenderSelectedPageOnly='true'.  The TabStrip and MultiPage sit inside a RadAjaxPanel.

    When EnableAjax='true' on the RadAjaxPanel the tooltips do not show.  No error is shown it simply does not show.  When I set EnableAjax='false' everything works as expected.

    Is tehre corrently a work around for this?

    Thanks in advance

    Guido Tapia
  2. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 20 Aug 2007 Link to this post

    Hi Guido Tapia,
    Unfortunately, the provided information is not enough for us to reproduce the problem. Would it be possible for you to prepare and send us a simple running project, demonstrating this problem?

    Best wishes,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 27 Aug 2007 Link to this post

    This very simple sample reproduces the problem. PS: This sample is basically excatly what I mentioned in my first post so I'm surprised you could not reproduce it, but here it is:

    NOTE:
    I am using
    Promethious: 2007.1.626.0
    RadTabStrip: 3.5.2.0
    RadAjax: 1.7.2.0

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="PicNet.RiskShield.Web.Test" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="rs" Namespace="PicNet.RiskShield.Controls" Assembly="PicNet.RiskShield" %>
    <%@ Register TagPrefix="radTS" Namespace="Telerik.WebControls" Assembly="RadTabStrip.Net2" %>
    <%@ Register TagPrefix="radAjax" Namespace="Telerik.WebControls" Assembly="RadAjax.Net2" %>
    <!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>Test Page</title></head>
    <body>
        <form id="f" runat="server">   
        <asp:ScriptManager ID="sm" runat="server" />
      <!-- REMOVE THIS AJAX PANEL AND TOOLTIPS WORK -->
        <radAjax:RadAjaxPanel ID="rap" runat="server">
       <radTS:RadTabStrip runat="server" ID="rts" SelectedIndex="0" MultiPageID="rmp" Skin="Outlook"
        Width="100%" ClickSelectedTab="true" AutoPostBack="true">
            <Tabs><radTS:Tab ID="tabGeneral" Text="Risk" /></Tabs>
       </radTS:RadTabStrip>
          <radTS:RadMultiPage runat="server" ID="rmp" SelectedIndex="0" CssClass="MultiPage" RenderSelectedPageOnly="true">               
        <radTS:PageView ID="pvGeneral" runat="server">                         
         <asp:Label runat="server" ID="InfoLabel" Visible="false" />
         <telerik:RadToolTipManager ID="rttm" runat="server" Position="Center" Animation="Fade"
          OnAjaxUpdate="DisplayTooltipForCell" Skin="Web20" AutoCloseDelay="0" ContentScrolling="Auto"
          ManualClose="true" Width="600px" Height="100px"
          Style="font-size: 18px; text-align: center; font-family: Arial;" />
         <asp:PlaceHolder ID="phTooltipeableControls" runat="server"></asp:PlaceHolder>
            </radTS:PageView>
          </radTS:RadMultiPage>   
        </radAjax:RadAjaxPanel>   
        </form>

  4. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 28 Aug 2007 Link to this post

    Hello Guido Tapia,
    I am using the exact code that you have provided with the versions of the controls you mention. However, I do not understand which element you expect to be tooltipified - the TargetControls collection is empty.

    In order to speed up the process of finding the cause for this behavior, please open a new support ticket and send us your test project as an attachment together with detailed information on the expected behavior. We will have a look at the project right away.

    Regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 03 Sep 2007 Link to this post

    Apologies I forgot to copy the code-behind, should be pretty straight forward.

    Thanks

    Guido Tapia

    public partial class Test : Page
     {
      protected void Page_Init(object sender, EventArgs e)
      {
       Label l1 = new Label();
       l1.ID = "l1";
       l1.Text = "Label 1";

       Label l2 = new Label();
       l2.ID = "l2";
       l2.Text = "Label 2";
       
       phTooltipeableControls.Controls.Add(l1);
       phTooltipeableControls.Controls.Add(l2);   
      }

      protected void Page_Load(object sender, EventArgs e)
      {
       if (IsPostBack) { return; }
       rttm.TargetControls.Add("l1");
       rttm.TargetControls.Add("l2");
      }

      protected void DisplayTooltipForCell(object sender, ToolTipUpdateEventArgs args)
      {
       args.UpdatePanel.ContentTemplateContainer.Controls.Add(InfoLabel);
       InfoLabel.Visible = true;
       InfoLabel.Text = "Tooltip Test Text: " + args.TargetControlID;
      }
     }

  6. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 07 Sep 2007 Link to this post

    Hello Guido Tapia,
    I added the code-behind to my test page, however, I get the same behavior no matter the value of the EnableAjax property. The problem comes from the fact that you update the RadToolTipManager and do not add the IDs of the labels to its TargetControls when you postback the page. In case you move the code that adds the IDs to the method where you create/recreate the labels, everything works as expected:

    protected void Page_Init(object sender, EventArgs e)  
    {  
        Label l1 = new Label();  
        l1.ID = "l1";  
        l1.Text = "Label 1";  
     
        Label l2 = new Label();  
        l2.ID = "l2";  
        l2.Text = "Label 2";  
     
        phTooltipeableControls.Controls.Add(l1);  
        phTooltipeableControls.Controls.Add(l2);  
     
        rttm.TargetControls.Add("l1");  
        rttm.TargetControls.Add("l2");  
    }  
     
    protected void Page_Load(object sender, EventArgs e)  
    {  
        if (IsPostBack) { return; }          


    Kind regards,
    Tsvetie
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top