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

Move one item at a time

3 Answers 69 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 31 Aug 2010, 03:52 PM
Hey,

I just had a question about the rotator.  I want to know if it is possible to only scroll one item at a time.  I want to display three items at a time.  But when they click the next/previous buttons it only should scroll one to the right or left.  So if the current items being displayed are:  Item 2 Item 3 Item 4 and they click the next button I would expect it to display: Item 3 Item 4 Item 5.

I read some previous posts and the only thing I could find was to use the scrollItem() client side method.  I tried using that method.  It does move the rotator 1 at a time, but it only moves it to the right.  To test this stuff, I added a third button (the other two are the ones added automatically) that called the scrollitem method.  If I clicked the scrollitem button first, it would move one forward.  Then if I click the built in previous and next buttons, they will then move one at a time.  But if I initially click the built in previous and next buttons, they move 3 at a time. 

Also, I want to set the intial index, but I want it to start in the middle of my list.  I'm writing out 11 items.  They all say Period 1 Period 2 Period 3, etc...  I want to always start in the middle of this list which would be Period 6.  But when I set the index, it does start at Period 6.  But I can't scroll back to Period 1.  Period 1-5 all get attached to the end of the rotator.  Is there a way I can make it so that the rotator starts in the middle of a list?

I can add my code if you need to see what I'm doing.

3 Answers, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 02 Sep 2010, 01:26 PM
Hi Chris,

In reference to your questions:
  • "I want to know if it is possible to only scroll one item at a time"
    When the control is setup with RotatorType="SlideShowButtons" or Buttons then the control will rotate the whole ViewPort, not an item at a time, so I suppose that you use one of these modes. If you need to move an item when you click a button (you can attach custom buttons as well using rotator's <ControlButtons inner property). then I recommend you to use RotatorType="FromCode" and use the solution provided in this online demo.
  • "I want to always start in the middle of this list"
    You can use this approach in order to achieve the desired result. You need to set the current index (oRotator.set_currentItemIndex(index);) when the RadRotator is loaded on the page using its onClientLoad event.

I hope this helps.

All the best,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Chris
Top achievements
Rank 1
answered on 02 Sep 2010, 03:28 PM
Hi,

I have a question.  Was the set_currentItemIndex method added recently to the Telerik controls?  I think I'm currently using the Q1 2010 release and I don't see that method in the rotator.
0
Pero
Telerik team
answered on 07 Sep 2010, 02:43 PM
Hi Chris,

Yes, this method was introduced in RadControls for ASP.NET AJAX Q2 2010 (version 2010.2 713).

Greetings,
Pero
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Rotator
Asked by
Chris
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Chris
Top achievements
Rank 1
Pero
Telerik team
Share this question
or