Hello all,
We just made some extensions to the RadToolTipManager client-API to make such a task easier. The Q1 SP1 will be released by the end of this week, and will feature the changes.
Here is a code sample that we prepared to demonstrate the approach we suggest (with a dynamically created tooltip on the client, as well as using AJAX)
function showToolTip(element) |
{ |
var tooltipManager = $find("<%= RadToolTipManager1.ClientID %>"); |
|
//Find the tooltip for this element if it has been created |
var tooltip = tooltipManager.getToolTipByElement(element); |
|
//Create a tooltip if no tooltip exists for such element |
if (!tooltip) |
{ |
tooltip = tooltipManager.createToolTip(element); |
} |
|
//Show the tooltip with the message [if any message is provided] |
//if (message) tooltip.set_text(message); |
|
//Set a server-side value to be delivered in the AJAX event |
//In this case we set the client ID of the target control itself |
tooltip.set_value(element.getAttribute("id")); |
tooltip.show(); |
} |
It is important to prevent the tooltip manager from tooltipifying the whole page by setting
AutoTooltipify="false",
also, you should "inform" the tooltip manager that showing of tooltips will be programmatic, and not using the mouse for example, so you need to set
ShowEvent="FromCode".
E.g.
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server"
AutoTooltipify="false"
OnAjaxUpdate="OnAjaxUpdate"
ShowEvent="FromCode"
></telerik:RadToolTipManager>
All the best,
Tervel
the Telerik team