This is a migrated thread and some comments may be shown as answers.

Display One image per next button click

2 Answers 106 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Harah Day
Top achievements
Rank 1
Harah Day asked on 04 Jan 2010, 02:20 AM
Hi there,

  I'm using Rotator control to display image gallery with RotatarType="Button". On button click I want to display next image.
All the images are of same size but when i click on Next button i see only half of the image displayed. I want to show 1 image on each
click. Is it possible using Rotator control ?

Here are my code.

                    <telerik:RadRotator ID="RadRotator1" runat="server" Width="400" Height="300" ItemWidth="400" ItemHeight="300"
                        RotatorType="Buttons">
                        <ItemTemplate>
                            <div class="itemTemplate">
                                <img src="<%# DataBinder.Eval(Container.DataItem, "Image") %>"
                                     alt="<%# DataBinder.Eval(Container.DataItem, "Name") %>" />
                            </div>
                        </ItemTemplate>
                    </telerik:RadRotator>

        Dim rotatorData As New DataTable()
        rotatorData.Columns.Add("Image")
        rotatorData.Columns.Add("Name")
        For Each tempInfo As fileInfo In imagesArray
            rotatorData.Rows.Add(New String() {tempInfo.filename, tempInfo.name})
        Next
        RadRotator1.DataSource = rotatorData
        RadRotator1.DataBind()

Attached jpg file shows two images at one time.


2 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 06 Jan 2010, 09:42 AM
Hello Ranga,

The solution for this behavior is described in this KB article. Could you please apply the steps described in the article and let me know the result?

I hope this helps.

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.
0
Harah Day
Top achievements
Rank 1
answered on 06 Jan 2010, 03:44 PM
Hi Fiko, Thanks for quick response and it worked.
Tags
Rotator
Asked by
Harah Day
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Harah Day
Top achievements
Rank 1
Share this question
or