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

Picking my Poison with RotatorType

1 Answer 43 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Denny
Top achievements
Rank 1
Denny asked on 17 Oct 2011, 03:35 PM
Basically, I want the type of animation featured in "Buttons" or "ButtonsOver", and I want to be able to scroll one index at a time.  I have 4 items displayed out of 6 possible, with wrap frames on.  Due to the nature of the web page that I'm displaying, that's exactly what I want.

When I have 'buttons' turned on, and I click one of my image buttons, the control scrolls 6 indexes in that direction.  The result is something that looks very awkward and strange.  


<telerik:RadRotator ID="RadRotator1" CssClass="bottom-Rotator" runat="server" Width="600px"
    ItemWidth="150" WrapFrames="true" ScrollDuration="500" PauseOnMouseOver="true" RotatorType="Buttons"
    ControlButtons-LeftButtonID="img_left" ControlButtons-RightButtonID="img_right">
</telerik:RadRotator>

In conclusion, that's the animation style I want, and I do want to be able to click the control buttons to have to move the items in the control.  But I want to scroll 1 index at a time, and not 6.

Moving onto ButtonsOver....

This lets me scroll one index at a time.  Cool, exactly what I want.  However, this happens when I mouse-over the buttons, and not when I click.  This makes it awkward if I want to visit this site using a smartphone, because, in order to scroll, I have to touch the arrow buttons, then touch off the buttons in order to stop the scrolling.

Basically what I would like is the ability to scroll one index at a time as if using buttonsOver, but only when I click the arrow keys, as in using buttons.  But there seems to be no way to do that, unless I am wrong, and I hope I am.  It seems weird to me that there is no way to control how many indexes I bypass when I click an arrow image.

I could select "FromCode", and use javascript/vb.net functions to manually change the index, but wouldn't I lose my animation then?

In conclusion, I'm looking for a solution that scrolls the items one at a time, when I click one of the set images, and still gives me the scrolling animation that's like "ButtonsOver".  Is that possible with this control?

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 20 Oct 2011, 07:58 AM
Hi Denny,

The behavior you want to implement is possible by setting RotatorType="FromCode", as you correctly guessed. Then you can use the Client API of the control in order to move its items when clicking custom directional buttons. A similar scenario is shown in the online demo Rotator / Client-side API. Note that the client method showNext(direction), which scrolls the rotator control in the specified direction, is utilized and the animation of the RadRotator is not lost.

For your convenience I have prepared also a sample project, implementing the suggested approach in a simpler scenario. Please use it as a reference for your further development.

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
Tags
Rotator
Asked by
Denny
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or