two rotators, one page, eventually out of sync

6 posts, 1 answers
  1. Randy Douglas
    Randy Douglas avatar
    10 posts
    Member since:
    Oct 2009

    Posted 18 May 2010 Link to this post

    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!
  2. Answer
    Randy Douglas
    Randy Douglas avatar
    10 posts
    Member since:
    Oct 2009

    Posted 19 May 2010 Link to this post

    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.

     

     

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Randy Douglas
    Randy Douglas avatar
    10 posts
    Member since:
    Oct 2009

    Posted 20 May 2010 Link to this post

    This thread can be marked as answered.
  5. Dan
    Dan avatar
    40 posts
    Member since:
    Mar 2009

    Posted 19 Jan 2012 Link to this post

    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
  6. Randy Douglas
    Randy Douglas avatar
    10 posts
    Member since:
    Oct 2009

    Posted 20 Jan 2012 Link to this post

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

    Posted 24 Jan 2012 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017