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

Ajax ToolTipManager inside a RadAjaxPanel

5 Answers 237 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Guido Tapia
Top achievements
Rank 1
Guido Tapia asked on 16 Aug 2007, 06:04 AM
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

5 Answers, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 20 Aug 2007, 09:56 AM
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
0
Guido Tapia
Top achievements
Rank 1
answered on 27 Aug 2007, 05:17 AM
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>

0
Tsvetie
Telerik team
answered on 28 Aug 2007, 03:09 PM
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
0
Guido Tapia
Top achievements
Rank 1
answered on 04 Sep 2007, 02:54 AM
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;
  }
 }

0
Tsvetie
Telerik team
answered on 07 Sep 2007, 07:51 AM
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
Tags
ToolTip
Asked by
Guido Tapia
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Guido Tapia
Top achievements
Rank 1
Share this question
or