ComponentOne ToolTip for ASP.NET AJAX: Working with the Client-Side C1ToolTip > Client-Side Events

Client-Side Events

C1ToolTip includes several client-side events that allow you to manipulate the C1ToolTip control, such as hiding or showing the ToolTip or performing an action before showing or hiding the ToolTip.

You can access these client-side events from the Properties window. To create a new client-side event using the Properties window, select the drop-down arrow next to a client-side event and select Add new client side handler.

Once you've added the client-side handler, Visual Studio will add a script to the Source view. That script will resemble the following:

 

<script type="text/javascript" id="ComponentOneClientScript1">

function C1ToolTip1_OnClientBeforeHide(args){

  //

  // Put your code here.

  //

};

</script>

 

Each of the client-side events requires two parameters: the ID that identifies the sender C1ToolTip, in this example, C1ToolTip1, and an eventArgs that contains the data of the event.

You can use the sever-side properties, listed in the Client Side Event table, to specify the name of the JavaScript function that will respond to a particular client-side event.

The following table lists the events that you can use in your client scripts. These properties are defined on the server side, but the actual events or the name you declare for each JavaScript function are defined on the client side.

Client Side Event table

Event Server-Side Property Name

Description

OnClientBeforeHide

Fires on client side before the ToolTip disappears.

OnClientBeforeShow

Fires on client side before the ToolTip appears.

OnClientHide

Fires on client side when the ToolTip is hidden.

OnClientShow

Fires on client side when the ToolTip is shown.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.