Rotator and WrapFrames with Buttons

4 posts, 0 answers
  1. Nicolas Fahr
    Nicolas Fahr avatar
    13 posts
    Member since:
    Dec 2008

    Posted 15 Aug 2012 Link to this post

    Consider the example on http://demos.telerik.com/aspnet-ajax/rotator/examples/default/defaultcs.aspx and change the RotatorType to Buttons and the Width to 1000px.
    Is there any solution how to have a smoother moving when clicking on the rotator buttons?

    When WrapFrames is disabled, the rotation seems to look good, but we indeed need the WrapFrames functionality set to true.

    Thanks in advance
  2. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 20 Aug 2012 Link to this post

    Hello Nicolas,

    In order for the RadRotator to work correctly in all scenarios please ensure that there are enough items for sliding the control more than one time (not all of them should be visible when the page is loaded) and the number of rotator items fits the width of the ViewPort, for example if there is space for 5 items, populate the control with 10, 15 etc. In the case you described all RadRotator items are visible in the ViewPort and they are reloaded when the control button is clicked. To avoid this effect you can add 10 more items in the RadRotator to ensure that they are enough items to be displayed in the ViewPort after the slide.

    Another approach is to utilize the ButtonsOver rotator mode or the Client-side API of the RadRotator (the showNext method) in order to slide only one item instead of all that are currently visible.

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

    Kind 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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nicolas Fahr
    Nicolas Fahr avatar
    13 posts
    Member since:
    Dec 2008

    Posted 20 Aug 2012 Link to this post

    Hello Slav,

    thank you for the response.
    I understand this is the expected behaviour,
    What I would have expected is: If 5 items are displayed in the viewport and there are 6 items in the databound collection, there should be items # 6, 1, 2, 3 and 4 on the second page; Items # 5, 1, 2, 3 and 4 on the next page and so on...
    Maybe you have an approach for that?

    Nicolas
  5. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 23 Aug 2012 Link to this post

    Hello Nicolas,

    You can achieve the desired effect if you double the data, entered in the RadRotator. For example, if you have six items, you will add them again so that every item is repeated. This way there will be enough items to display on every page of the rotator. Note that this will be required only when number of items is less than the doubled number of items that fit on one page, in this case the scrolling will be performed without clearing the already displayed items.

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