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

asp:Button postback always closes RadTooltip

1 Answer 127 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
ksuh
Top achievements
Rank 1
Veteran
ksuh asked on 21 Sep 2011, 11:25 PM
Even if I cancel the close event, the tooltip always closes on postback.  Async postback does the same thing.  Other regular buttons (e.g. html button) work as expected - the close event gets cancelled.

The button is inside the the RadTooltip.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Sep 2011, 02:40 PM
Hi  Kwang,

When a postback occurs the entire page is disposed and therefore the RadToolTip should hide, as it is a control that "lives" in the page. In the case of an AJAX request you need to make sure that the RadToolTip is not disposed again - i.e. it is outside of the update panel. The so-called HTML buttons (I assume you mean <button> and <input type="button" /> ) do not perform a postback and therefore do not dispose the page. This means that for a button within the tooltip you need to place the update panel within the tooltip as well, for example:

<asp:Button ID="Button1" Text="postback and the tooltip SHOULD hide" runat="server" />
<div id="target" style="width: 100px; height: 100px; background-color: Yellow;">
    click for tooltip</div>
<telerik:RadToolTip runat="server" ID="RadToolTip1" TargetControlID="target" IsClientID="true"
    Width="350px" Height="100px" Title="Some Title" ShowEvent="OnClick" HideEvent="ManualClose"
    Position="BottomRight" RelativeTo="Element">
    <asp:UpdatePanel ID="Updatepanel3" runat="server" RenderMode="inline">
        <ContentTemplate>
            This is in an update panel. The tooltip is not inside, so it will not be disposed, and will
            not hide. The trick is that only the content of the tooltip will be updated in the response
            <br />
            <asp:Button ID="Button4" Text="AJAX request and the tooltip will not hide" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
</telerik:RadToolTip>



Best wishes,
Marin
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
Tags
ToolTip
Asked by
ksuh
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Share this question
or