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

Coverflow - text under pictures

5 Answers 98 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
jc mag
Top achievements
Rank 1
jc mag asked on 19 Nov 2010, 11:25 AM
Is it possible to display text under each pictures in coverflow mode?

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 Nov 2010, 01:26 PM
Hello,



You can customize the item by using adding controls in ItemTemplate section.

A sample mark-up is shown:
<telerik:RadRotator ID="RadRotator1" runat="server"
     Width="748px" ItemWidth="150" ScrollDirection="Left, Right" Height="233px" ItemHeight="113"
     ScrollDuration="500" FrameDuration="2000" PauseOnMouseOver="false" RotatorType="CoverFlow"
     InitialItemIndex="4" OnClientItemShown="OnClientItemShown" OnClientItemClicked="OnClientItemClicked"
     CssClass="RemoveRotatorBorder">
     <ItemTemplate>
         <asp:Image ID="Image1" runat="server" ImageUrl='<%# Container.DataItem %>' />
         <asp:Label ID="Label1" runat="server" Text='<%# Eval("CategoryName") %>'></asp:Label>
     </ItemTemplate>
 </telerik:RadRotator>

More information: CoverFlow Mode


-Shinu.
0
Tsvetie
Telerik team
answered on 19 Nov 2010, 03:00 PM
Hello Shinu,
You can review our car rental demo application as well - http://demos.telerik.com/aspnet-ajax/carrental. In this application, we are using a Label control in the ItemTemplate of RadRotator. Even though in the application we are using a rotator in Carousel mode, you can use the same idea for the ItemTemplate with a rotator in CoverFlow mode.

Greetings,
Tsvetie
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
jc mag
Top achievements
Rank 1
answered on 19 Nov 2010, 04:26 PM
Thanks, it works; but the texts are overlapping each other. Is there a way to show the text only for the current item?
I was thinking about using OnClientItemShown, so I could display the texts outside the rotator for full customization, but I can't find in the help how to retrieve the dataitem of the current item...
0
Fiko
Telerik team
answered on 24 Nov 2010, 02:14 PM
Hello jc,

You can use the approach show in this code library in order ti get reference to the elements in the rotator's ItemTemplate.

Kind regards,
Fiko
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
jc mag
Top achievements
Rank 1
answered on 24 Nov 2010, 04:27 PM
Thanks, I've been able to do what I wanted to, except that it doesn't work in IE6 :(
Your getWrapperElement:

function getWrapperElement(rotatorItem)  
{  
    var itemElem = rotatorItem.get_element();  
    var wrapper = itemElem.firstChild;  
    return wrapper;  
}  

returns null in IE6... ??
EDIT: it works now, probably my mistake
Tags
Rotator
Asked by
jc mag
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Tsvetie
Telerik team
jc mag
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or