RadRotator scroll button issue

5 posts, 0 answers
  1. Sasa
    Sasa avatar
    12 posts
    Member since:
    Aug 2007

    Posted 10 Aug 2009 Link to this post

    Hi.

    There appears to be a bug with left button in RadRotator.
    I've put up a simple horizontal rotator and I have a problem: when rotator is positioned at page 2  - it allows a user to click the left button more then once before it disables it (for the purpose of reaching the begining of the list). What happens is - if a users clicks the left button more then once fast enough - the list ends up out of bounds. This only happens with the left(previous page) button; right(next page) buttons works properly.

    I'd appreciate if I could get some help, if there is some way to work around that bug. Thanks.

    Here's an example to reproduce the mentioned issue; first, scroll to page 2 and then click left scroll button a couple of times fast:
    (Q2 2009 - 701)
    <telerik:RadScriptManager runat="server" /> 
    <telerik:RadRotator ID="RadRotator1" runat="server" RotatorType="Buttons" WrapFrames="false" Width="540px" Height="135px" ItemHeight="135px" ItemWidth="135px"
    <ItemTemplate> 
        <div style="background: red; width: 135px; height: 135px;"
        TEST 
        </div> 
    </ItemTemplate> 
    <Items> 
        <telerik:RadRotatorItem ID="RadRotatorItem1" runat="server" /> 
        <telerik:RadRotatorItem ID="RadRotatorItem2" runat="server" /> 
        <telerik:RadRotatorItem ID="RadRotatorItem3" runat="server" /> 
        <telerik:RadRotatorItem ID="RadRotatorItem4" runat="server" /> 
        <telerik:RadRotatorItem ID="RadRotatorItem5" runat="server" /> 
        <telerik:RadRotatorItem ID="RadRotatorItem6" runat="server" /> 
    </Items> 
    </telerik:RadRotator> 
  2. Sasa
    Sasa avatar
    12 posts
    Member since:
    Aug 2007

    Posted 10 Aug 2009 Link to this post

    I tested a bit more and found out that this issue is related to the ScrollDuration. Setting this property to zero, fixes the problem.

    Still, I'd prefer to have a nice animation when users scrolls. :-)
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 12 Aug 2009 Link to this post

    Hello Saws,

    The behavior that you experience is expected because the buttons are disabled after the last item (on the left, right etc.) is scrolled. In your case, if you scroll to the last Item and you click on the scroll button during the scrolling then this event will be stored and will be executed after the last item is shown. The result is that the latest item will be scrolled and a empty space will be shown. In case that you set the if the ScrollDuration="1" (I recommend you use '1' millisecond instead of '0')  then the scrolling is very fast and the behavior described above will not occur. 
    As I noted above, the behavior that you experience is by design and for the time being we do not plan to change it because it will affect the control's behavior in other scenarios.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. Sasa
    Sasa avatar
    12 posts
    Member since:
    Aug 2007

    Posted 12 Aug 2009 Link to this post

    How can allowing a control to "scroll into nothing" be by design?

    Alright, so the button is not disabled until the scroll animation finishes. Why not simply add to the left button click handler code to check if the collection is already scrolled to zero and ignore if it is (instead of scrolling it to -1)? Right button seems to handle this correctly.

    Obviously, RadRotator without scroll animation doesn't make a very attractive solution. Scrolling into empty space is even worse. I really wish you'd fix this.
  6. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 13 Aug 2009 Link to this post

    Hi Sasa,

    As I mentioned earlier, this behavior is by design and the changes will affect the control in other scenarios. We will consider, however, improving the control's behavior in the feature. For the time being I recommend you use the RadRotator control in RotatorType="FromCode"  and implement custom rotation.

    For your convenience I've attached a sample to this thread. Please, note that in the provided code I have used an additional variable - viewportItemsCount. You need to set this variable to the count of the simultaneously displayed items. 

    I hope this helps.

    Regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017