Initial image functionality not working also Transparent Background not working also Animation type Fade not working

5 posts, 0 answers
  1. hkdave95
    hkdave95 avatar
    245 posts
    Member since:
    Nov 2006

    Posted 26 Aug 2008 Link to this post

                Dim loRadRotator As New DAREnterprises.Web.UI.clsRadRotator  
                loRadRotator.ID = "rrHome1" 
                loRadRotator.InitialItemIndex = 0 
                loRadRotator.ItemTemplate = New DAREnterprises.Web.clsRadRotatorTemplate  
                loRadRotator.RotatorType = Telerik.Web.UI.RotatorType.SlideShow  
                loRadRotator.SlideShowAnimation.Type = Telerik.Web.UI.Rotator.AnimationType.Fade  
                loRadRotator.FrameDuration = 5000 
                loRadRotator.BackColor = Drawing.Color.Transparent  
                loRadRotator.Height = New Unit(185)  
                loRadRotator.DataSource = loRotatorData1 
                Call loRadRotator.DataBind()  
                Call Me.divRadRotator1.Controls.Add(loRadRotator)  
     
    Hi

    I am creating my RadRotator programatically as above.

    • InitialItemIndex
    • RotatorType
    • Backcolor

    All of the above don't seem to have an effect.

    My Template is as below ...

    Public Class clsRadRotatorTemplate  
            Implements ITemplate  
     
            Public Sub InstantiateIn(ByVal loContainer As System.Web.UI.Control) Implements System.Web.UI.ITemplate.InstantiateIn  
                Call loContainer.Controls.Clear()  
     
                Dim loControl As New LiteralControl("<table style=""width: 100%; height: 100%""><tr><td>")  
                Call loContainer.Controls.Add(loControl)  
     
                Dim loImage As New Image  
                loImage.Height = New Unit(140)  
                AddHandler loImage.DataBinding, AddressOf img_DataBinding  
                Call loContainer.Controls.Add(loImage)  
     
                loControl = New LiteralControl("<br /></td></tr><tr><td>")  
                Call loContainer.Controls.Add(loControl)  
     
                Dim loText As New Label  
                AddHandler loText.DataBinding, AddressOf lblText_DataBinding  
                Call loContainer.Controls.Add(loText)  
     
                loControl = New LiteralControl("</td></tr></table>")  
                Call loContainer.Controls.Add(loControl)  
            End Sub  
     
            Sub img_DataBinding(ByVal sender As Object, ByVal e As EventArgs)  
                Dim loImage As Image = TryCast(sender, Image)  
                Dim loFrame As Telerik.Web.UI.RadRotatorItem = TryCast(loImage.NamingContainer, Telerik.Web.UI.RadRotatorItem)  
                loImage.ImageUrl = DirectCast(loFrame.DataItem, clsRotator).ImageURL  
                loImage.AlternateText = DirectCast(loFrame.DataItem, clsRotator).AlternateText  
            End Sub  
     
            Sub lblText_DataBinding(ByVal sender As Object, ByVal e As EventArgs)  
                Dim loLabel As Label = TryCast(sender, Label)  
                Dim loFrame As Telerik.Web.UI.RadRotatorItem = TryCast(loLabel.NamingContainer, Telerik.Web.UI.RadRotatorItem)  
                loLabel.Text = DirectCast(loFrame.DataItem, clsRotator).Text  
            End Sub  
     
            Public Sub New()  
                Call MyBase.New()  
            End Sub  
     
        End Class 

    If you want to see the problem have a look at http://the-dl-outlet.co.uk

    Kind Regards

    David
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 27 Aug 2008 Link to this post

    Hello hkdave95,

    I tried to reproduce your case locally but to no avail - everything is working as expected. For convenience I attached to this thread a small sample that uses dynamically created RadRotator for ASP.NET AJAX that shows content from the Northwind database - I see in your code that you are using a custom implementation of the rotator.

    As you can see in the attached project, the InitialItemIndex and RotatorType properties are working as expected, so I am not sure what can be the reason for the problem on your side. As for BackColor, this property is inherrited and currently RadRotator is not affected by it. To make the rotator transparent, you can use the following style:
    .radr_clipRegion 
        background-color:transparent !important; 
    .radr_item div 
        background-color:transparent !important; 


    I hope this helps. If you still experience problems, please open a support ticket and send us a full, working sample project that reproduces them. Just make sure that the project can be run locally and is not missing files or database and attach it to the support ticket - we will check it right away.


    Best wishes,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. hkdave95
    hkdave95 avatar
    245 posts
    Member since:
    Nov 2006

    Posted 28 Aug 2008 Link to this post

    Hi

    Have you tried where there is only one data item for the Rotator ?

    Kind Regards

    David
  5. hkdave95
    hkdave95 avatar
    245 posts
    Member since:
    Nov 2006

    Posted 28 Aug 2008 Link to this post

    Hi

    Also my Rotator is in a MultiPage.

    Kind Regards

    David
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 29 Aug 2008 Link to this post

    Hi David,

    I attached a short video showing the rotator in multipage with only 1 item - as you can see, everything is working as expected. Please open a support ticket and send us a small sample project that isolates the problem so we can check it.


    Regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017