The News Rotator Freezes upon loading

3 posts, 0 answers
  1. Art Handy
    Art Handy avatar
    11 posts
    Member since:
    Jun 2005

    Posted 06 Oct 2011 Link to this post

    While attempting to use the RadRotator, built upon one of telerik's examples, the data seems to be read fine from the database, however when attempting to display the RadRotator just freezes displaying on partilal data. Here is my code:
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="OCSNews.aspx.vb" Inherits="NewsFeed_OCSNews" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <title>News Ticker</title>
    <script runat="server">
        Protected Function GetDayOfWeek(dateTimeString As String) As String
            Dim result As DateTime = DateTime.Parse(dateTimeString)
            Dim dayOfWeek As String = [Enum].GetName(GetType(DayOfWeek), result.DayOfWeek)
            Return dayOfWeek
        End Function
        Protected Function GetTimeOnly(dateValue As String) As String
            Return System.DateTime.Parse(dateValue).ToString("hh:mm tt")
        End Function
        Protected Function GetDateOnly(dateValue As String) As String
            Return System.DateTime.Parse(CDate(dateValue)).ToString("ddd, MMM d, yyyy")
        End Function
        <form id="frmDefault" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <table id="tblNews" runat="server">
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="InfoUpdatePanel">
                            <telerik:AjaxSetting AjaxControlID="rotSchoolNews">
                                    <telerik:AjaxUpdatedControl ControlID="panSchoolNews" />
                    <telerik:RadAjaxLoadingPanel ID="InfoUpdatePanel" runat="server" Transparency="30"
                        <asp:Image ID="imgLoading" runat="server" ImageUrl="~/Images/sm_loading.gif" Width="60px"
                            Style="border: 0px;" AlternateText="Loading..." ToolTip="Loading..." />
                    <div id="panSchoolNews" runat="server">
                        <a href='<%# Eval("Event_DTG").ToString() %>' style="cursor: pointer; text-decoration: none;
                            color: Black; background-image: url('images/Monday.png');"></a>
                            <div class="backElement">
                                <br />
                                <telerik:RadRotator ID="rotSchoolNews" ScrollDirection="Up" ScrollDuration="2000"
                                    runat="server" Width="493px" ItemWidth="493px" Height="344px" ItemHeight="64px"
                                    FrameDuration="1" InitialItemIndex="-1" CssClass="rotator" DataSourceID="SqlNews">
                                        <div class="itemTemplate" onclick="javascript:popwindowfull('NewsFeed/OCSNews.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"Event_ID") %>')"
                                            style="background-image: url('images/<%# Me.GetDayOfWeek(Eval("Event_DTG").ToString()) %>.png');">
                                            <div class="dateTime">
                                                <div class="time">
                                                    <%# (Me.GetTimeOnly(DataBinder.Eval(Container.DataItem, "Event_DTG")))%>
                                                <div class="date">
                                                    <%# (Me.GetDateOnly(DataBinder.Eval(Container.DataItem, "Event_DTG")))%>
                                            <div class="title">
                                                    <%# System.Web.HttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Event_Headline").ToString())%>
                            <asp:SqlDataSource ID="SqlNews" runat="server" ConnectionString="<%$ ConnectionStrings:OglethorpeConnectionString %>"
                                SelectCommand="SELECT Event_ID, Event_DTG, Event_Headline, Event_Text, Event_Group, Event_Location FROM OCS_Event WHERE (Event_EffectiveDate <= getdate()) AND (Event_DTG >= getdate()) ORDER BY Event_DTG">
    I can't seem to figure out what's going on. Can anyone please help? Thanks
    P.S. I have attached a screen shot to help visualize the isssue.
  2. Art Handy
    Art Handy avatar
    11 posts
    Member since:
    Jun 2005

    Posted 10 Oct 2011 Link to this post

    Anyone able to help me out here? Please.
  3. Slav
    Slav avatar
    1359 posts

    Posted 11 Oct 2011 Link to this post

    Hello Art,

    I tried to reproduce the described problem, but to no avail. You can find attached the sample page that I used for testing. Please compare it with your actual project and check if there are differences in the setup. I have added also a short video, demonstrating the behavior of the RadRotator on my end.

    By default the rotator control pauses when hovered with the cursor. This behavior can be controlled through the property PauseOnMouseOver, so you can set it to false if you want to prevent stopping of the items' rotation.

    Note that at the current circumstances I am mostly guessing as to what your setup is. If you are still unable to resolve your problems please open a regular support ticket and send us a sample, runnable project that isolates your issue so that we can examine it locally and provide a more specific answer.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top