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

retreiving index from one rotator to assign to another

2 Answers 44 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Randy Douglas
Top achievements
Rank 1
Randy Douglas asked on 19 May 2010, 11:29 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Petio Petkov
Telerik team
answered on 20 May 2010, 03:05 PM
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.
0
Randy Douglas
Top achievements
Rank 1
answered on 20 May 2010, 06:24 PM
Thanks.
Tags
Rotator
Asked by
Randy Douglas
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Randy Douglas
Top achievements
Rank 1
Share this question
or