This is a migrated thread and some comments may be shown as answers.

Get frame index on the client-side

1 Answer 64 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 05 Jan 2009, 04:55 PM
On my rotator control I'm using the OnClientItemClicked event.  I want to be able to hook the index of the item I click on.  How do I do this?  All I find as documentation for client-side programming is: http://www.telerik.com/help/aspnet-ajax/rotator-clientside-api.html, but this doesn't help.

Thank you in advance for help/assistance,
Stephen

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 06 Jan 2009, 11:53 AM
Hello Stephen,

You can get the index of the clicked item like this:

function OnItemClicked(sender, arg) 
    var clickedItem= arg.get_item(); 
    alert(" Current item's index is : " + clickedItem.get_index()); 

Note that the index of  first item is  0.

I hope this helps.

Greetings,
Fiko
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Rotator
Asked by
Stephen
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or