More in this section

radRotator

9 posts, 0 answered
  1. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    30 Jun 2009
    Link to this post
    I am having a bit of an issue wit the radRotator cntrol.
    How can i get it to display only one item at a time.
    I want it to rotate trhough the items. But what i get is a little bit of the next item. It sort of wrapps everything.
    I tried seting the wrapframes to false. But all that does is stop rotating after the items have run out.

    here is my code:

     

    <telerik:RadRotator ID="uxContentRotator" runat="server"   
        onitemdatabound="uxContentRotator_ItemDataBound" BorderStyle="Dotted"   
        Height="376px" ItemHeight="500px" ItemWidth="785px" RotatorType="SlideShow"   
        Skin="Office2007" Width="629px" WrapFrames="False">  
        <ItemTemplate> 
            <asp:Label ID="uxContent" runat="server"></asp:Label> 
        </ItemTemplate> 
    </telerik:RadRotator> 

     

     

    using System;  
    using System.Collections;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
    using Telerik.Cms.Engine;  
     
    public partial class Custom_Controls_GCRotator : System.Web.UI.UserControl  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            ContentManager manager = new ContentManager("Generic_Content");  
            IList dataSource = manager.GetContent();  
     
            uxContentRotator.DataSource = dataSource;  
            uxContentRotator.DataBind();  
        }  
        protected void uxContentRotator_ItemDataBound(object sender, RadRotatorEventArgs e)  
        {  
            (e.Item.FindControl("uxContent"as Label).Text = ((IContent)e.Item.DataItem).Content.ToString();  
        }  
    }  
     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    30 Jun 2009
    Link to this post
    Hi Andrew,

    You could try changing the width property if your content items have certain size. As I see it you are setting a content to a label text. The label control supports width property that can be used.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    01 Jul 2009
    Link to this post
    I have changed the size of the Label as well as the rotateType to Automatic Advance.
    There is still one problem though.
    I have currently two content items.
    The firs one show ok, the second one show slightly moved to the right, then it goes back to normal and the two itesms rotate correctly, showing in the right position.

    Only once it show the wrong position. But i am not sure why. There is very little code as you ca see in my previous post.
    Is there something i can do about that. It looks terrible this way.
  4. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    01 Jul 2009
    Link to this post
    Just to clrearify. There is in fact a small skip to the right. So it rotates to the correct position then it does a very small skip to the right. And then it continues rotating correctly.

    A
  5. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    03 Jul 2009
    Link to this post
    Wow, this is really weird.
    I have recreated this code at home and it works fine. No skip to the right.
    After that i have deleted the control from my office machine. Deleted the page it was on.
    Created a new page, uploaded the new control. I have copied the files from my home machine.
    And it does it again.

    It's skipping to the right. That is just soo wierd.
    The only other things i have on here are two sample modules. products and link4 from the blog.

    I guess this will remind a mistery.

    I think i will just use the code in a new blank project to avoid this.

    A
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    03 Jul 2009
    Link to this post
    Hello Andrew,

    Could it be CSS issue? Can you check if the two sites are using the same CSS? Ctrl+F5 reloads the page by clearing the cache, so you might also try that.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    07 Jul 2009
    Link to this post
    No that's not it.
    I guess it has something to do with the rotator iself.
    Otherwise the picture would not just jump back to it's correct position.

    A
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    10 Jul 2009
    Link to this post
    Hi Andrew,

    Are you using two different versions of Sitefinity, respectively the RadControls? I am wondering how this would work on one project, and not an another.

    You can send us the code after the last modification, and let us know about the exact version of Sitefinity on which it is not working.

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    17 Jul 2009
    Link to this post

    I am afraid i can't be any help in how it happened.
    I have deleted that project after that i took the copy from my windows 7 machine and put it on my vista machine.
    This one works just fine.

    Really don't know what the problem was. I was using the same version of sitefinity in both cases.
    The only difference really was the fact that i used that project for testing lots of samples out.
    Perhaps i have installed one of the older products module samples and done something to the controls. Perhaps i overwrote the control with an older version.

    On a clean new project with no samples and tests, the code works perfectly fine.

Register for webinar
9 posts, 0 answered