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

two rotators, one page, eventually out of sync

5 Answers 62 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Randy Douglas
Top achievements
Rank 1
Randy Douglas asked on 18 May 2010, 04:22 PM
I have two radrotators, a horizontal scroller with 4 images at the bottom, and a single 'main' image radrotator at the top. I have it set up to display the disappearing item in the bottom scroller to the main image section as it moves forward. Is it possible to have the main image radrotator change based on the index of the lower one while still using the 'slide show' or 'automatic advance' rotator type? Or running two rotators off the same timer would help. After a couple minutes they get out of sync. I set both rotators to have the same scrollduration and frameduration. If this is possible, can you please offer a sample. Thanks!

5 Answers, 1 is accepted

Sort by
0
Accepted
Randy Douglas
Top achievements
Rank 1
answered on 20 May 2010, 02:15 AM
RotatorType="FromCode"    
OnClientItemShowing="itemShowing_handler"    
 
function itemShowing_handler(sender, args) {   
    if (sender.isScrollingLeft() == true) {   
        $find('<%= ActiveSlide.ClientID %>').showNext(Telerik.Web.UI.RotatorScrollDirection.Up);    
    }   
    else if (sender.isScrollingLeft() == false) {   
        $find('<%= ActiveSlide.ClientID %>').showNext(Telerik.Web.UI.RotatorScrollDirection.Down);   
    }  
Figured it out. 

This worked for my previous and next buttons also.

 

 

 

0
Randy Douglas
Top achievements
Rank 1
answered on 20 May 2010, 05:53 PM
This thread can be marked as answered.
0
Dan
Top achievements
Rank 1
answered on 19 Jan 2012, 07:23 PM
Hi Randy,

I am looking to do exactly the same thing that you describe in this thread (i.e. a main image rotator with a multiple image rotator below it that are kept in sync).  I was wondering if you still had this code around and could provide me with a working sample?

Thanks in advance for your help.
Dan
0
Randy Douglas
Top achievements
Rank 1
answered on 20 Jan 2012, 07:03 PM
Hi Dan,

Unfortunatly, I do not. I posted this long ago while working for a previous employer. Hopefully what I've already posted will help.
0
Slav
Telerik team
answered on 24 Jan 2012, 02:31 PM
Hi Dan,

I have prepared a sample project that demonstrates the desired functionality. Overall, the following approach is used:
  • Setup the main image rotator in FromCode mode (RotatorType="FromCode").
  • Attach a handler to the OnClientItemShowing event of the multiple images rotator.
  • Implement the handler as follows :
function OnClientItemShowing(sender, args) {
    var singleImageRotator = $find("<%= RadRotator1.ClientID %>");
    singleImageRotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left);
}

Please use the attached example as a reference for incorporating this feature into your actual project.

Regards,
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
Randy Douglas
Top achievements
Rank 1
Answers by
Randy Douglas
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Slav
Telerik team
Share this question
or