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

Tooltips not working

2 Answers 159 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 18 Mar 2020, 08:08 AM

Hi,

 

Copied the following straight from the docs but not working:

 

    <telerik:RadToolTipManager RenderMode="Lightweight" ID="RadToolTipManager2" runat="server" Skin="Web20">
    <TargetControls>
        <telerik:ToolTipTargetControl IsClientID="False" TargetControlID="TextBox1" Value="ValueForTextBox1" />
    </TargetControls>
</telerik:RadToolTipManager>

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

Using latest build.

 

Marc

2 Answers, 1 is accepted

Sort by
0
Accepted
Doncho
Telerik team
answered on 19 Mar 2020, 05:45 PM

Hello Marc,

In addition to the code snippet you have shared, you will also need to attach the OnAjaxUpdate event to the Grid and update the ContentTemplateContainer with the ToolTip value.

Sample C# code

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
{ 
    string ttValue = args.Value;
    //use the value to populate the toolip (fetch data from a database or to set properties of a user control)
    //the below line directly sets its as text for the tooltip:
    args.UpdatePanel.ContentTemplateContainer.Controls.Add(new LiteralControl(ttValue));
}

I have updated the documentation article to explicitly mention that. Here is the Git commit: docs(tooltip): fix snippets. Changes will be applied within an hour counting from the time the Commit was pushed to the production branch.

Kind regards,

Doncho
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 20 Mar 2020, 12:58 PM
Thanks Doncho, this clears.
Tags
ToolTip
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Doncho
Telerik team
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or