Events Overview
RadToolTip and RadToolTipManager both support the same client-side events that let you customize the behavior of the control:
OnClientBeforeShow occurs just prior to the display of the tool tip.
OnClientShow occurs as the tooltip is displayed.
OnClientBeforeHide occurs just prior to the tool tip being hidden.
OnClientHide occurs as the tooltip is hidden.
To use these events, simply write a JavaScript function that can be called when the event occurs. Then assign the name of the JavaScript function as the value of the the corresponding property.
<script type="text/javascript">
function clientShow(sender, eventArgs)
{
alert("OnClientShow tool tip: " + sender.get_text());
}
</script>
<telerik:RadToolTip RenderMode="Lightweight" ID="RadToolTip1" runat="server" Skin="Inox" TargetControlID="Button1"
IsClientID="true" OnClientShow="clientShow" Text="text">
</telerik:RadToolTip>
You can also assign event handlers in client-side code. For more information see the Setting Event Handlers via JavaScript article.
For a live example illustrating the RadToolTip client-side events, see the Client-side events live demo.
The RadToolTipManager also offers three additional events that are specific for its Load-On-Demand functionaliaty:
- OnClientRequestStart
- OnClientResponseEnd
- OnClientResponseError
Read more about them in the ToolTipManager Specific Events help article.