ToolTip OnEvent for detail grid button

2 posts, 0 answers
  1. License Developer
    License Developer avatar
    5 posts
    Member since:
    Jan 2008

    Posted 14 Jan 2008 Link to this post

    Great Tools!

    How do I add a tooltip to a detailGrid button.
    I want to display non-visible databound text as a tooltip when the button is clicked.

  2. Tervel
    Tervel avatar
    1337 posts

    Posted 17 Jan 2008 Link to this post


    We are not sure what exactly the scenario is, but here are some suggestions:

    1. RadTooltip can be easily configured to be shown when its target control is clicked by setting ShowEvent="OnClick"

    2. You should set the text you want to display in the tooltip either by setting its Text property, or by adding it between the RadToolTip opening and closing tags.

    3. The last thing that you need to do is to bind each RadToolTip to a button. At this point, if the button and the tooltip are declared in a template that is loaded multiple times in a grid, the binding cannot be done declaratively - because the buttons ID is changed and made unique for each grid row. So, you need to use a grid event, such as ItemDataBound.
    You should use FindControl in the current context of the row, find the button, get its ClientID and set it to the RadToolTip object.

    toolTip.TargetControlID = button.ClientID;
    toolTip.IsClientID = true;

    Best regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top