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

ToolTip OnEvent for detail grid button

1 Answer 69 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
License Developer
Top achievements
Rank 1
License Developer asked on 14 Jan 2008, 09:47 PM
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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 17 Jan 2008, 09:18 AM
Hello,

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,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ToolTip
Asked by
License Developer
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Share this question
or