How to autostart rotate when choose Rotater Type "Buttons"

7 posts, 1 answers
  1. Abdullah
    Abdullah avatar
    11 posts
    Member since:
    Oct 2011

    Posted 25 Feb 2012 Link to this post

    Hello, I want my carousel to start rotate as its in "Automatic Advance" mode, but also i want to use buttons, how can i do that. When i choose "buttons" mode it doesnt auto start scrolling. 
  2. Answer
    Slav
    Admin
    Slav avatar
    1356 posts

    Posted 29 Feb 2012 Link to this post

    Hello Abdullah,

    You can use a RadRotator control with RotatorType property, set to CarouselButtons, and configure the handler of the OnClientLoad event as shown in the following code snippet in order to incorporate auto scrolling:
    function OnClientLoad(rotator, args) {
        if (!rotator.autoIntervalID) {
            rotator.autoIntervalID = window.setInterval(function () {
                rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left);
            }, rotator.get_frameDuration());
        }
    }
    For your convenience I have attached a sample project that demonstrates this solution.

    I hope this helps. Feel free to contact us again if you run into more difficulties.

    Greetings,
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Abdullah
    Abdullah avatar
    11 posts
    Member since:
    Oct 2011

    Posted 29 Feb 2012 Link to this post

    thanks a lot, that is what i want.
  5. Abdullah
    Abdullah avatar
    11 posts
    Member since:
    Oct 2011

    Posted 01 Mar 2012 Link to this post

    PauseOnMouseOver=true   doesnt work  when i try the sample code you have sent. I tried both

    function OnClientMouseOver(sender, eventArgs) {
           sender.pause();
           sender.remove_load();
        }

    that doesnt either stop the rotator from rotating. 
  6. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 05 Mar 2012 Link to this post

    Hi Abdullah,

    The methods that you tried do not work because the default behavior of the RadRotator control is modified when the suggested custom script is applied to the control. You should clear the interval, set with the client-side method setInterval, in order to stop  the automatic scrolling.

    You can find attached a sample page that implements this approach. Please use it as a reference for your further development.

    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.
  7. Manu
    Manu avatar
    24 posts
    Member since:
    Aug 2015

    Posted 27 Aug 2015 Link to this post

    hi,

     the above posts are helped me alot. thanks for the above post.

     i am using charts to scroll in rotator.

    but Slav solution is not working for me to pause scroll onMouseOver.

    please help me out.​

  8. Manu
    Manu avatar
    24 posts
    Member since:
    Aug 2015

    Posted 27 Aug 2015 in reply to Manu Link to this post

    no thanks!

    i worked out.. its working :)

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017