Simple RadRotator example

9 posts, 1 answers
  1. Pontus Johansson
    Pontus Johansson avatar
    7 posts
    Member since:
    Apr 2010

    Posted 26 Aug 2010 Link to this post

    I'm looking at the demo example of the radrotator and I can't get it to work. What I want is to scroll between two or more image that I know the urls of.

    My code:

    <telerik:RadRotator ID="RadRotator1" runat="server" Width="580px" ItemWidth="300"
                    Height="250px" ItemHeight="220" ScrollDuration="500" FrameDuration="2000"
                    PauseOnMouseOver="false">              
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl="http:/..1.jpg." />
                    </ItemTemplate>
    <ItemTemplate>
                        <asp:Image ID="Image2" runat="server" ImageUrl="http:/..2.jpg" />
                    </ItemTemplate>
        </telerik:RadRotator>



    What am I missing here? Nothing is visible.
            
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Aug 2010 Link to this post

    Hello,


    Add the Image controls in RadRotatorItem -> ItemTemplate section and see whether it helps.

    ASPX:
    <telerik:RadRotator ID="RadRotator1" runat="server" Width="580px" ItemWidth="300"
        Height="250px" ItemHeight="220" ScrollDuration="500" FrameDuration="2000" PauseOnMouseOver="false">
        <Items>
            <telerik:RadRotatorItem>
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Basketball1.png" />
                </ItemTemplate>
            </telerik:RadRotatorItem>
            <telerik:RadRotatorItem>
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Basketball2.png" />
                </ItemTemplate>
            </telerik:RadRotatorItem>
        </Items>
    </telerik:RadRotator>



    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pontus Johansson
    Pontus Johansson avatar
    7 posts
    Member since:
    Apr 2010

    Posted 27 Aug 2010 Link to this post

    Thank you!
  5. Ugan
    Ugan avatar
    3 posts
    Member since:
    Jun 2009

    Posted 27 Apr 2011 Link to this post

    Hi Shinu

    I have tried the following modification to your code but it does not display anything - any ideas why? Code is below that doesnt display anything

    <head id="Head1" runat="server">
        <title></title>
        <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="BODY">
        <form id="form1" runat="server">
        <div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
              
            <telerik:RadRotator ID="RadRotator1" runat="server" DataSourceID="SqlDataSource1" RotatorType="AutomaticAdvance">
         
        <Items>
          
            <telerik:RadRotatorItem>
          
                <ItemTemplate>
         
                     <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("fld_binaryfield2") %>'
                                    AutoAdjustImageControlSize="true" Width="90px" Height="110px"  />
         
               </ItemTemplate>
         
            </telerik:RadRotatorItem>
      
      
            <telerik:RadRotatorItem>
         
                <ItemTemplate>
         
                      <telerik:RadBinaryImage runat="server" ID="RadBinaryImage2" DataValue='<%#Eval("fld_binaryfield1") %>'
                                   AutoAdjustImageControlSize="true" Width="90px" Height="110px"  />
         
                </ItemTemplate>
         
            </telerik:RadRotatorItem>
          
        </Items>
      
    </telerik:RadRotator>
      
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings: %>"
    ProviderName="<%$ ConnectionStrings.ProviderName %>" SelectCommand="SELECT COMMAND"
    </asp:SqlDataSource
        </div>
        </form>
    </body>
    </html>
  6. Niko
    Admin
    Niko avatar
    387 posts

    Posted 29 Apr 2011 Link to this post

    Hi Ugan,

    Please, make sure that you have specified all the dimensions in the declaration of the RadRotator, i.e. Width/Height and ItemWidth/ItemHeight.

    Hope this helps.

    Regards,
    Niko
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  7. Qurat
    Qurat avatar
    21 posts
    Member since:
    Jan 2013

    Posted 26 Apr 2013 Link to this post

    Hi,
    i want to clear images from radrotator once a new value is selected from radcombobox.
    i am using radrotator and radcombobox.the district name is selected from radcombobox and its correponding images are displayed.
    there is just one problem that all the districts don't have same number of images to be displayed.the district with less pictures shows blank segments for pictures meaning that once images are created they are not being cleared.
    i am attaching my code kindly have a look.
  8. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 30 Apr 2013 Link to this post

    Hello Qurat,

    I have already provided suggestions about your problem in this forum thread.

    Please use a separate thread for every scenario you want to report in the future so that the information is easier to track.

    Regards,
    Slav
    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.
  9. Preeti
    Preeti avatar
    8 posts
    Member since:
    Jan 2014

    Posted 21 Jan 2014 Link to this post

    Hi shinu,


    Can we add images of database to rad rotator or is there any control by which i make a attractive gallery of database images.
  10. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Jan 2014 Link to this post

    Hi Preeti,

    Please have a look into the following code snippet to show the images from database in RadRotator.

    ASPX:
    <telerik:RadRotator runat="server" ID="itemsRotator" Height="128px" DataSourceID="SqlDataSource1">
        <ItemTemplate>
            <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" AutoAdjustImageControlSize="false"
                Width="200px" Height="130px" ResizeMode="Fit" ImageAlign="Middle" DataValue='<%#Eval("Img") %>' />
        </ItemTemplate>
    </telerik:RadRotator>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"  ConnectionString="<%$ ConnectionStrings:Northwind_newConnectionString %>"
        SelectCommand="SELECT [Img] FROM [Images]"></asp:SqlDataSource>

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017