New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Events Overview

RadRotator provides the following client-side events:

The event handler method for any of the events can be set on the server and on the client.

Server-side

To handle the desired event, the user must set the respective property to the name of the JavaScript function handling the event. Here is an example:

ASP.NET
<script type="text/javascript">
	function OnClientItemClicked(sender, eventArgs) {
		alert("RadRotator was clicked.");
	}
</script>
<telerik:RadRotator RenderMode="Lightweight" ID="RadRotator1" runat="server" ScrollDirection="Left" Height="113px"
	ItemHeight="113px" Width="150px" ItemWidth="150px" OnClientItemClicked="OnClientItemClicked">
	<ItemTemplate>
		<img src=".........." alt="" />
	</ItemTemplate>
</telerik:RadRotator>

Client-side

To handle the desired event, the user should use the respective add_(handlerFunction) to attach the desired handler (i.e. add_clicked for the clicked event), where the parameter handlerFunction should be of type function. To remove a handler that has been added previously, the respective remove_(handlerFunction) should be used. Here is an example showing how to add handler on the client:

ASP.NET
<script type="text/javascript">
	function Click(rotator, args) {
		alert("Rotator was clicked");
	}
	function pageLoad() {
		var rotator = $find("<%=RadRotator1.ClientID %>");
		rotator.add_itemClicked(Click);
	}
</script>
<telerik:RadRotator RenderMode="Lightweight" ID="RadRotator1" runat="server" ScrollDirection="Left" Height="113px"
	ItemHeight="113px" Width="150px" ItemWidth="150px">
	<ItemTemplate>
		<img src=".........." alt="" />
	</ItemTemplate>
</telerik:RadRotator>

See Also

In this article
Server-sideClient-sideSee Also
Not finding the help you need?
Contact Support