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

RadToolTipManager doesn't work

2 Answers 98 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
reza
Top achievements
Rank 1
reza asked on 14 Apr 2011, 10:52 AM
Hi

Please consider this simple page , Why RadToolTipManager doesn't change the ToolTip

    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
                <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Skin="Hay" Animation="FlyIn">
        </telerik:RadToolTipManager>
        <asp:CheckBox ID="CheckBox1" runat="server" ToolTip="test tooltip" />
    </div>
    </form>

Thanks

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 Apr 2011, 04:05 PM

Hi Reza,

You simply have not set the ToolTipManager to tooltipify this checkbox. In a very simple scenario you can use its AutoTooltipify proeprty and set it to true.

The better approach is to add the checkbox to tooltipify the element dynamically:

1. add the checkbox to the target controls collection:

protected void Page_Load(object sender, EventArgs e)
    {
        RadToolTipManager1.TargetControls.Add(CheckBox1.ClientID, true);
    }

2. attach to the OnAjaxUpdate event of the ToolTipManager:

<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Animation="FlyIn" OnAjaxUpdate="OnAjaxUpdate">

3. define the custom content:

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs e)
    {
        e.UpdatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl("My dynamic tooltip"));
    }

4. remove the ToolTip property of the checkbox, as it will duplicate the new tooltip and is not necessary



Kind regards,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
reza
Top achievements
Rank 1
answered on 16 Apr 2011, 02:12 PM
Yes 
Thank you
Tags
General Discussions
Asked by
reza
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
reza
Top achievements
Rank 1
Share this question
or