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

Rotator Server side event

3 Answers 56 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Ahad
Top achievements
Rank 1
Ahad asked on 20 Sep 2012, 04:25 PM
Hi there,
is there a server side event for these two arrow button, shown below in image.
If not, could you please provide an example of client side event in this case.

Thanks,

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Sep 2012, 05:20 AM
Hi Ahad,

You can attach click event in RadRotator buttons using jquery as follows.

JS:
<script type="text/javascript">
    $('.rrButton').click(function ()
    {
        // Your Code
    });
</script>

Thanks,
Princy.
0
Ahad
Top achievements
Rank 1
answered on 21 Sep 2012, 08:22 AM
Hi Princy,
Thanks for your prompt reply. I must admit that I am quite novice when it comes to javascript.
Now when I click on right or left button, I do get an event, but how can I get the current index of rotator item?
can one raise a server event for this?
Best regards,
Ahad
0
Slav
Telerik team
answered on 25 Sep 2012, 11:35 AM
Hi Ahad,

The RadRotator does not fire a server-side event when its items are scrolled as this functionality is executed entirely on the client. There are two client-side events - OnClientItemShowing and OnClientItemShown - that are fired respectively before and when a new item is displayed, which happens on a control button click. Both events expose the currently shown item and the client-side API of the control will allow you to retrieve the index as described in the linked help articles.

All the best,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Rotator
Asked by
Ahad
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ahad
Top achievements
Rank 1
Slav
Telerik team
Share this question
or