Radbuttons to navigate

2 posts, 1 answers
  1. Kurt Kluth
    Kurt Kluth avatar
    144 posts
    Member since:
    Oct 2009

    Posted 07 Aug 2013 Link to this post

    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"
                       <table width="610">
                           <tr><td><p><asp:Label ID="PersonName" runat="server"><%# XPath("ImageText")%></asp:Label></p></td></tr>
                               <telerik:RadButton ID="_leftBtn" runat="server" Text="Previous">
                               <telerik:RadButton ID="_rightBtn" runat="server" Text="Next">
                               <a href="#" id="leftBtn" title="Rotate Left" class="leftButton">Previous</a><a href="#" id="rightBtn" title="Rotate Right" class="rightButton">Next</a>                     
                               <asp:Image ID="CustomerImage" runat="server" AlternateText="Customer image" ImageUrl='<%# XPath("ImageUrl") %>' CssClass="personImage"></asp:Image>
                   <ControlButtons LeftButtonID="leftBtn" RightButtonID="rightBtn"></ControlButtons>
  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    3567 posts

    Posted 09 Aug 2013 Link to this post

    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.

    Marin Bratanov
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top