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

How to autostart rotate when choose Rotater Type "Buttons"

6 Answers 90 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Abdullah
Top achievements
Rank 1
Abdullah asked on 25 Feb 2012, 04:25 PM
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. 

6 Answers, 1 is accepted

Sort by
0
Accepted
Slav
Telerik team
answered on 29 Feb 2012, 10:52 AM
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.
0
Abdullah
Top achievements
Rank 1
answered on 29 Feb 2012, 11:05 AM
thanks a lot, that is what i want.
0
Abdullah
Top achievements
Rank 1
answered on 01 Mar 2012, 01:28 PM
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. 
0
Slav
Telerik team
answered on 05 Mar 2012, 11:49 AM
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.
0
Bhavya
Top achievements
Rank 1
answered on 27 Aug 2015, 06:15 AM

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.​

0
Bhavya
Top achievements
Rank 1
answered on 27 Aug 2015, 07:44 AM

no thanks!

i worked out.. its working :)

Tags
Rotator
Asked by
Abdullah
Top achievements
Rank 1
Answers by
Slav
Telerik team
Abdullah
Top achievements
Rank 1
Bhavya
Top achievements
Rank 1
Share this question
or