retreiving index from one rotator to assign to another

3 posts, 1 answers
  1. Randy Douglas
    Randy Douglas avatar
    10 posts
    Member since:
    Oct 2009

    Posted 19 May 2010 Link to this post

    On the client side, I'm having trouble retreiving the index from one rotator to assign it to another. I'm clicking on a rotator item to load it in another rotator. I've tried a few things but have been unsuccessful so far. Here's what I've tried:
     
    function itemOnClick_handler(sender, args) {   
    $find('<%= ActiveSlide.ClientID %>').InitialItemIndex = args.get_item().get_index();   
    $find('<%= ActiveSlide.ClientID %>').InitialItemIndex = sender.CurrentItemIndex();   
    $find('<%= ActiveSlide.ClientID %>').InitialItemIndex = sender.get_item().get_index();   
    $find('<%= ActiveSlide.ClientID %>').InitialItemIndex = args.get_item().CurrentItemIndex();   
    }  
     
    Are any of the above close? Here's my rotator:  
       
    <telerik:RadRotator ID="ThumbRotator" runat="server" RotatorType="FromCode" Width="628" Height="118px" ItemHeight="118" ItemWidth="157" ScrollDuration="500" FrameDuration="3000" ScrollDirection="Left" PauseOnMouseOver="false" 

    OnClientItemShowing

     

    ="itemShowing_handler" OnClientItemClicked="itemOnClick_handler"

    >  

    <ItemTemplate>   
        <div class="itemTemplate">  
            <asp:Label ID="hlnkThumbTitle" runat="server" Font-Names="Arial" Font-Size="XX-Small" Text='<%# DataBinder.Eval(Container.DataItem, "thumbTitle") %>'></asp:Label> 
            <br /> 
            <img src=
    '<%# DataBinder.Eval(Container.DataItem, "thumbImage") %>' alt='<%# DataBinder.Eval(Container.DataItem, "thumbTitle") %>' class="RotatorImage" width="85px" height="60" />  
        </div>   
    </ItemTemplate>   
    <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />   
    <SlideShowAnimation Type="Fade"></SlideShowAnimation>   
    </telerik:RadRotator>   
     
     
     

     

     


  2. Answer
    Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 20 May 2010 Link to this post

    Hello Randy,

    The current RadRotator's version doesn't allow to set RadRotator's initialItemIndex property on the client. The only one way to achieve your goal is to set InitialItemIndex on the server via AJAX.
    You can find a simple source code which illustrates the fore-mentioned technique in the following KB article:
    http://www.telerik.com/community/code-library/aspnet-ajax/rotator/jump-to-frame.aspx
    Let us know if you have any other questions.

    Greetings,
    Petio Petkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Randy Douglas
    Randy Douglas avatar
    10 posts
    Member since:
    Oct 2009

    Posted 20 May 2010 Link to this post

    Thanks.
Back to Top