I want to display non-visible databound text as a tooltip when the button is clicked.
Thanks
1 Answer, 1 is accepted
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.