Using tooltip inside an ajaxified panel

2 posts, 0 answers
  1. Morten
    Morten avatar
    5 posts
    Member since:
    Apr 2009

    Posted 16 Oct 2009 Link to this post


    I got a problem with the tooltip when using it inside a panel. When I hit the textbox "txtProductID" the tooltip shows up as expected. But when I hit "Button1" which causes a partial postback, all hell breaks loose. It then throws the following javascript error:

     'undefined' is null or not an object'



    If I place the tooltip outside the panel it's possible to make postbacks inside the tooltip. But then everything stops working when a postback is made in the outermost panel.



    If I use a regular updatepanel which is set to conditional instead of the radajaxmanager everything works great, but I'd like to use the radajaxmanager. What can I do about it?



    asp:Panel ID="pnlProducts" runat="server" style="display:inline">
       <asp:TextBox ID="txtProductID" runat="server" Width="50" MaxLength="8"></asp:TextBox>




    telerik:RadToolTip ID="RadToolTip1" runat="server" Animation="None" ContentScrolling="None" ShowEvent="OnClick" HideEvent="ManualClose" Width="370" Height="150" ShowDelay="0" HideDelay="0" TargetControlID="txtProductID">


          <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">



             <asp:Button ID="Button1" runat="server" Text="Do postback" CausesValidation="false" />












    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">



          <telerik:AjaxSetting AjaxControlID="pnlProducts">






                <telerik:AjaxUpdatedControl ControlID="pnlProducts" />
















  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 21 Oct 2009 Link to this post

    Hi Morten,

    I examined your code and I found that the reason for the problem is not actually in the control but in the used configuration. When you use RadAjaxManager, you actually wrap the specified content in an update panel and as a result you get nested update panels - one from the manager and one from teh nested ajax panel. In this case you should additionally set UpdateMode="Conditional" as you have found yourself. However, I do not see why you need the additional RadAjaxPanel - if you want to use a RadAjaxManager I recommend to remove the RadAjaxPanel at all - this will fix the problem. IN case you want to use the nested RadAjaxPanel for updating tooltip's content (which is not demonstrated in the sample code) you can use a standard panel instead and update it through the RadAjaxManager.

    This being said, I suggest to remove the RadAjaxPanel and everything should work. For more complicated scenario, you can also make things work by using only the RadAjaxmanager for controlling ajax request without nesting RadAjaxPanel at all.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top