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

Radbuttons to navigate

1 Answer 29 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Kurt Kluth
Top achievements
Rank 1
Kurt Kluth asked on 07 Aug 2013, 08:33 PM
Trying to implement the RadRotator and use RadButtons to navigate through the slideshow however can't seem to get them to work.  When using the buttons the Rad control automatically puts in additional buttons along the side.  If I use the Links (<a href>) and click next it will navigate to the next page ok but doesn't get beyond that. 

I have 20 some pages that I would like to navigate through. 

Can someone point me in the right direction or tell me what I am doing wrong?

<telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="XmlDataSource1"
                   Width="610px" Height="800px" ScrollDuration="2000"
                   FrameDuration="2000" RotatorType="Buttons"
                   BorderColor="#bfd8e8" BorderWidth="1"
                   ScrollDirection="Left,Right" WrapFrames="false"
                   >
               <ItemTemplate>
                   <table width="610">
                       <tr><td><p><asp:Label ID="PersonName" runat="server"><%# XPath("ImageText")%></asp:Label></p></td></tr>
                       <tr><td>
                           <telerik:RadButton ID="_leftBtn" runat="server" Text="Previous">
                           </telerik:RadButton>
                           <telerik:RadButton ID="_rightBtn" runat="server" Text="Next">
                           </telerik:RadButton>     
                           <a href="#" id="leftBtn" title="Rotate Left" class="leftButton">Previous</a><a href="#" id="rightBtn" title="Rotate Right" class="rightButton">Next</a>                     
                       </td></tr>
                       <tr><td>
                           <asp:Image ID="CustomerImage" runat="server" AlternateText="Customer image" ImageUrl='<%# XPath("ImageUrl") %>' CssClass="personImage"></asp:Image>
                       </td></tr>
                   </table>
               </ItemTemplate>
               <ControlButtons LeftButtonID="leftBtn" RightButtonID="rightBtn"></ControlButtons>
           </telerik:RadRotator>

1 Answer, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 09 Aug 2013, 10:49 AM
Hello Kurt,

 I would advise that you do not set a rotator type with buttons in it, but instead add custom HTML elements (they could be  RadButtons, of course, with their OnClientClicked event handler) that will only execute some JavaScript (so the RadButtons must not postback - their AutoPostBack property must be false).

This script will use the rotator's client-side API as shown in this demo: http://demos.telerik.com/aspnet-ajax/rotator/examples/clientapicontrol/defaultcs.aspx. Look for the showNext(direction) method.

I also believe you may find interesting this demo: http://demos.telerik.com/aspnet-ajax/rotator/examples/pagerintegration/defaultcs.aspx.

Overall, the custom buttons or the built-in buttons are outside of the items, so if you need buttons that control the rotator inside the items they would need to use its public API.


Regards,
Marin Bratanov
Telerik
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 the blog feed now.
Tags
Rotator
Asked by
Kurt Kluth
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or