Having trouble displaying content

2 posts, 0 answers
  1. Condorito
    Condorito avatar
    38 posts
    Member since:
    Mar 2009

    Posted 05 Oct 2011 Link to this post

    I apologize in advance if maybe I'm just missing something obvious, but can't figure this out.  I have a rotator which I want to display only one item at a time, but it seems that when it slides to the next item, it is not lined up correctly and sometimes displays the content of two items at once.  I've attached an image as an example, and the code is below.  How can I make sure it only displays one item, similar to the rotator under the Twitter demo of the Notification control?  Thank you in advance.

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
       <telerik:RadRotator ID="AlertsRotator" runat="server" RotatorType="Buttons" Height="200px" ItemHeight="200px" ScrollDirection="Left"
                  Width="500px"  ItemWidth="500px">
                <ItemTemplate  >
                <div style="text-align: left">
                       <table width="480px">
                      <td align="Center"><strong><%# DataBinder.Eval(Container.DataItem," UserNotificationSubject") %></strong></td>
                      <td align="left"><%# DataBinder.Eval(Container.DataItem,"UserNotificationMessage") %></td>
                      <input type="button" value="click me" onclick="alert('<%# DataBinder.Eval(Container.DataItem,"UserNotificationSeqNum") %>')" /></td>
    Public Partial Class Rotator
        Inherits System.Web.UI.Page
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim oData As New DataTable
            With oData
            End With
            Dim NewRow As DataRow = oData.NewRow
            NewRow("UserNotificationSeqNum") = "0"
            NewRow("UserNotificationSubject") = "Test User Notification Subject"
            NewRow("UserNotificationMessage") = "Test User Notifcation Message"
            NewRow = oData.NewRow
            NewRow("UserNotificationSeqNum") = "1"
            NewRow("UserNotificationSubject") = "REMINDER"
            NewRow("UserNotificationMessage") = "Document T1 Reminder: I'm testing the reminders (To cancel this reminder use 20 on Document)"
            NewRow = oData.NewRow
            NewRow("UserNotificationSeqNum") = "2"
            NewRow("UserNotificationSubject") = "REMINDER"
            NewRow("UserNotificationMessage") = "Document T1 Reminder: I'm testing the reminders adslfjkasd;lfja;ld jf;ladjf; lakjfd;askf jal;sdjf ;lasdjf;askjf;lka"
            NewRow = oData.NewRow
            NewRow("UserNotificationSeqNum") = "3"
            NewRow("UserNotificationSubject") = "Web Entry Stuff"
            NewRow("UserNotificationMessage") = "The following document has been entered through the UI"
            AlertsRotator.DataSource = oData
        End Sub
    End Class
  2. Slav
    Slav avatar
    1359 posts

    Posted 10 Oct 2011 Link to this post

    Hi Juan,

    The problem is caused by the value, set in the Width property of the RadRotator. Please keep in mind that you should add 20 pixels to the width of the rotator control for every directional button, when using RotatorType Buttons. You can refer to the help article How to configure RadRotator, which contains information on the matter at the end.

    In conclusion, the correct configuration of your RadRotator is displayed in the following example:
    <telerik:RadRotator ID="AlertsRotator" runat="server" RotatorType="Buttons" Height="200px"
        ItemHeight="200px" ScrollDirection="Left" Width="520px" ItemWidth="500px">

    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