Modal ToolTip closes on PostBack

2 posts, 0 answers
  1. Steven
    Steven avatar
    29 posts
    Member since:
    Jan 2013

    Posted 09 Feb 2013 Link to this post

    I have a Modal ToolTip with ShowEven and HideEvent both set to FromCode.  The ToolTip displays a panel that contains a RadGrid and two buttons.  The Grid is set to allow column filtering.

    When I run the page and display the ToolTip it works fine.  However, if I apply a filter, that causes a PostBack which "closes" the ToolTip. I think from other posts I have read that I need to either reshow the ToolTip or "ajaxify" the grid so that the postback is only a partial. 

    What's the best approach?  If I decide to reshow the ToolTip, how do I determine that it was supposed to be open?  If I decide to ajaxify the interaction, what settings?  I tried setting the Grid as the Target and the ToolTip as the Updated control but that didn't help.

  2. Marin Bratanov
    Marin Bratanov avatar
    3558 posts

    Posted 11 Feb 2013 Link to this post

    Hi Steve,

    I believe your other thread with a similar question already contains some useful information on the matter:

    For the RadGrid - perhaps the easiest way to do this is to wrap it in a RadAjaxPanel and use its client events to store the shown tooltip in order to re-show it after the response ends, e.g.:
    <telerik:RadAjaxPanel ID="rapProgress" runat="server" ClientEvents-OnRequestStart="storeTooltip"
            <telerik:RadGrid ID="rg1" runat="server">
                            <asp:HyperLink ID="target" runat="server" Text="View Tooltip"></asp:HyperLink>
                            <telerik:RadToolTip ID="rttLog" runat="server" RelativeTo="Element"
                                Width="200px" TargetControlID="target">
    <script type="text/javascript">
        var lastTooltipID = null;
        function storeTooltip()
            lastTooltip = Telerik.Web.UI.RadToolTip.getCurrent();
            if (lastTooltip)
                lastTooltipID = lastTooltip.get_id();
        function showLastTooltip()
            if (lastTooltipID)
                setTimeout(function ()
                    lastTooltipID = null;
                }, 100);

    If you are using RadAjaxManager you would most likely have to set the RadGrid as the initiator and the grid and tooltip/tooltipmanager as updated controls, e.g.:
    <telerik:AjaxSetting AjaxControlID="rg1">
            <telerik:AjaxUpdatedControl ControlID="rg1" />
            <telerik:AjaxUpdatedControl ControlID="rttm1" />
    Note that both approaches should be avoided - either the RadAjaxPanel, or RadAjaxManager should be used.

    Kind regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top