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

showNext() and ControlButton contradiction

2 Answers 142 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Jonathan Hunter
Top achievements
Rank 2
Jonathan Hunter asked on 21 Nov 2008, 05:09 PM
<p><asp:Button ID="rightButton" runat="server" Text="Right" /> | <asp:Button ID="leftButton" runat="server" Text="Left" /></p
<p><a href="javascript:void(0);" onclick="$find('<%=RadRotator1.ClientID%>').showNext(Telerik.Web.UI.RotatorScrollDirection.Right);">Right</a> | <href="javascript:void(0);" onclick="$find('<%=RadRotator1.ClientID%>').showNext(Telerik.Web.UI.RotatorScrollDirection.Left);">Left</a></p
<telerik:RadRotator ID="RadRotator1" runat="server" Height="300px" Width="500px" ItemHeight="300px" ItemWidth="500px" RotatorType="SlideShowButtons" ScrollDirection="Left,Right" SlideShowAnimation-Type="fade"
    <ItemTemplate> 
        <%# Eval("Name")%> 
    </ItemTemplate> 
    <ControlButtons LeftButtonID="leftButton" RightButtonID="rightButton" /> 
</telerik:RadRotator> 
 

I have the above code on a test page attempting to test out the Rotator functionality and I found this functionality to be a little peculiar. When using the ControlButtons method of progressing the slides, it's working as expected. However, if I use the corresponding JavaScript method the slides go in reverse.

For instance, the leftButton moves the slides to the left as expected. But the showNext(Telerik.Web.UI.RotatorScrollDirection.Left) Javascript method will move the slides to the right.

This is obviously not a show stopper or anything, but I figured I'd let you guys know.

2 Answers, 1 is accepted

Sort by
0
Accepted
Lini
Telerik team
answered on 24 Nov 2008, 04:12 PM
Hi,

I think what's confusing you are the names of the buttons. "RightButton" means that the button is on the right side of the rotator. However, when you click it the content is actually moved to the left(ScrollDirection.Left). This can be better illustrated in the scrolling rotator modes (e.g. RotatorTye="Buttons"). You will see that when you click the button on the left side of the rotator, the content scrolls to the right (ScrollDirection.Right).

Regards,
Lini
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jonathan Hunter
Top achievements
Rank 2
answered on 24 Nov 2008, 07:11 PM
Ah, okay. That makes sense. Thanks for the clarification.
Tags
Rotator
Asked by
Jonathan Hunter
Top achievements
Rank 2
Answers by
Lini
Telerik team
Jonathan Hunter
Top achievements
Rank 2
Share this question
or