Tooltips not working

3 posts, 1 answers
  1. Fit2Page
    Fit2Page avatar
    458 posts
    Member since:
    Feb 2007

    Posted 18 Mar 2020 Link to this post

    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. Answer
    Doncho
    Admin
    Doncho avatar
    96 posts

    Posted 19 Mar 2020 Link to this post

    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.
  3. Fit2Page
    Fit2Page avatar
    458 posts
    Member since:
    Feb 2007

    Posted 20 Mar 2020 in reply to Doncho Link to this post

    Thanks Doncho, this clears.
Back to Top