RadRotator doesn't work fine .

6 posts, 0 answers
  1. Michael
    Michael avatar
    13 posts
    Member since:
    Sep 2008

    Posted 18 Oct 2009 Link to this post

    Hello ,
    i am using a radRotator emedded in webpart the rotator works fine in asp web application , but when i use my web part the rotator didn't works fine . it didn't rotate to all item it just display the item no 2 then the rotator rotate to an empty item .and stop and nothing else occures ,

    here is rotator

    <%

    @ Control Language="C#" AutoEventWireup="true" Inherits="SACMSharePointWebPart.uc_FastTickerNews" %>

     

    <%

    @ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2009.1.402.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

     

            <telerik:RadRotator ID="NewsRotator" RotatorType="AutomaticAdvance" ScrollDirection="Up" 
                SlideShowAnimation-Type="Fade" ScrollDuration="200" runat="server" Width="100%" 
                FrameDuration="6000" ItemHeight="30px" ItemWidth="100%" Height="30px" InitialItemIndex="0" 
                Skin="Vista">  
                <ItemTemplate> 
                    <table style="text-align: right;">  
                        <tr style="height: 30px;">  
                            <td> 
                                <div style="width: 100%; filter: alpha(opacity=90); font-weight: bold; font-family: Tahoma;  
                                    background-color: #fff"> 
                                    <%# Eval("Location") %> 
                                    &nbsp; :&nbsp;</div> 
                            </td> 
                            <td style="padding-left: 10px">  
                                <div style="width: 100%; filter: alpha(opacity=90); font-family: Tahoma;  
                                    background-color: #fff"> 
                                    <telerik:RadTicker ID="RadTicker1" runat="server">  
                                        <Items> 
                                            <telerik:RadTickerItem Text='<%# Eval("Title") %>' /> 
                                        </Items> 
                                    </telerik:RadTicker> 
                                </div> 
                            </td> 
                        </tr> 
                    </table> 
                </ItemTemplate> 
            </telerik:RadRotator> 

    and the rotator code behind
        public class uc_FastTickerNews : UserControl  
        {  
            public RadRotator NewsRotator  
            {  
                get 
                {  
                    return this.FindControl("NewsRotator"as RadRotator;  
                }  
            }  
     
            /// <summary>  
            /// Handles the Load event of the Page control.  
            /// </summary>  
            /// <param name="sender">The source of the event.</param>  
            /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>  
            protected void Page_Load(object sender, EventArgs e)  
            {  
                List<TickerNewsContainer> lst = new List<TickerNewsContainer>();  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 1" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 2 " });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "3 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION4 " });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "5 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "6 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION7 " });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "8 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "9 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "10 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 11" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION 12 " });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "13 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION14 " });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "15 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "16 LOCATION" });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "LOCATION17 " });  
                lst.Add(new TickerNewsContainer { Title = "NEW NEWS", Location = "18 LOCATION" });  
                this.NewsRotator.DataSource = lst;  
                this.NewsRotator.DataBind();  
            }  
        } 


    alse here is the web part code

       [

    Guid("d879501c-6386-4646-bd57-cd012ca9f6e6")]

     

     

       public class SACMFastTickerNews : System.Web.UI.WebControls.WebParts.WebPart

     

       {

     

           public uc_FastTickerNews FastTickerNews { get; set; }

     

     

           
           public
    SACMFastTickerNews()

     

           {

           }

           protected override void CreateChildControls()  
            {  
                base.CreateChildControls();  
                this.FastTickerNews = (uc_FastTickerNews)Page.LoadControl("~/_controltemplates/uc_FastTickerNews.ascx");  
                this.Controls.Add(this.FastTickerNews);  
            }
            #region Events & Fixers  
     
            protected override void OnInit(EventArgs e)  
            {  
                base.OnInit(e);  
             ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);  
                if (scriptManager == null)  
                {  
                    scriptManager = new ScriptManager();  
                    if (this.Page.Form.FindControl("ScriptManager1") == null)  
                    {  
                        scriptManager.ID = "ScriptManager1";  
                        this.Page.Form.Controls.AddAt(0, scriptManager);  
                    }  
                }  
                return scriptManager;  
            }
            #endregion 
       }

    please help me :)
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 20 Oct 2009 Link to this post

    Hello Michael,

    I see that you use percent values in the RadRotator's declaration. This scenarios is already discussed in this forum thread and the solution is to use fixed values in the RadRotator's declaration.

    I hope this helps.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  3. Michael
    Michael avatar
    13 posts
    Member since:
    Sep 2008

    Posted 20 Oct 2009 Link to this post

    I have change the percentage width to pixed width but  nothing happened
    here is my changes
    <telerik:RadRotator ID="NewsRotator" RotatorType="AutomaticAdvance" ScrollDirection="Up" 
        SlideShowAnimation-Type="Fade" ScrollDuration="200" runat="server" Width="640px" 
        FrameDuration="6000" ItemHeight="30px" ItemWidth="630px" Height="30px" InitialItemIndex="0" 
        Skin="Vista"

    note the rotator works fine at crome but IE doen't work
  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 22 Oct 2009 Link to this post

    Hello Michael,

    This behavior occurs when the RadRotator's Width, ItemWidth, Height, ItemHeight properties are not set according to the size of the items in the ItemTemplate. Please modify those properties according to the suggested in this forum thread and you should not experience the same behavior.
    In case, however, that the problem still exists,  please open a new support ticket and send me an example page with RadRotator control and a sample datasource that is similar to the one you used. I will check it and do my best to provide a working solution.

    Regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Michael
    Michael avatar
    13 posts
    Member since:
    Sep 2008

    Posted 25 Oct 2009 Link to this post

    hello ,
    i have tried all solution but i failed please help me to find out the problem ..
    here is my webpart


    i am using sharepoint MOSS 2007 , and IE 8

    thanks
  6. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 28 Oct 2009 Link to this post

    Hi Michael,

    Unfortunately, the provided link is broken and I cannot download the file. Could you please update it? Also, please make sure that all referenced CSS classes in the files, are included in the attachment.

    Sincerely yours,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top