Rotator Server side event

4 posts, 0 answers
  1. Ahad
    Ahad avatar
    5 posts
    Member since:
    Jul 2012

    Posted 20 Sep 2012 Link to this post

    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,

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Sep 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ahad
    Ahad avatar
    5 posts
    Member since:
    Jul 2012

    Posted 21 Sep 2012 Link to this post

    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
  5. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 25 Sep 2012 Link to this post

    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.
Back to Top