Items in hidden panel

2 posts, 0 answers
  1. Robert Verderber
    Robert Verderber avatar
    33 posts
    Member since:
    Aug 2005

    Posted 10 Oct 2011 Link to this post

    I am using Rad Controls (version 2001.1.413.35). I have a RadAjaxPanel that has an ASP panel control in it. This panel gets hidden/displayed when a check box is selected/unselected. In the panel I have a ASP label control that has a tool tip associated with it. The process of hiding the panel and displaying it again in the RadAjaxPanel makes the tool tip not work any longer. This makes sense since it disappears from the DOM. 

    Anyone know the proper way to re-associate/re-activate the tool tip with the label control after the RadAjaxPanel updates? 

    Thanks in advance,

  2. Marin Bratanov
    Marin Bratanov avatar
    4931 posts

    Posted 12 Oct 2011 Link to this post

    Hi Robert,

    The simplest way is to put the RadToolTip in the update panel as well so that it can reattach its events when it is recreated with the other elements after the resopnse is received.:
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1">
        <telerik:RadToolTip runat="server" ID="RadToolTip1" ShowEvent="OnClick" HideEvent="ManualClose"
            Width="300px" Height="100px" Text="lorem ipsum dolor sit amet" TargetControlID="Label1"
        <asp:Panel ID="Panel1" runat="server">
            <asp:Label ID="Label1" Text="click here for tooltip" runat="server" />
        <br />
        <asp:CheckBox ID="Checkbox1" Checked="true" Text="panel visible" AutoPostBack="true"
            OnCheckedChanged="changeVisibility" runat="server" />

    protected void changeVisibility(object sender, EventArgs e)
        if (Checkbox1.Checked)
            Panel1.Visible = true;
            Panel1.Visible = false;

    A more difficult approach would be to use the RadAjaxManager so taht you can easily intercept the event when the response is received, then obtain the ClientID of the required label and use the RadToolTip's Client-side API to set the targetControlID.

    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
Back to Top