Move one item at a time

4 posts, 0 answers
  1. Chris
    Chris avatar
    43 posts
    Member since:
    Aug 2008

    Posted 31 Aug 2010 Link to this post

    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.
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 02 Sep 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chris
    Chris avatar
    43 posts
    Member since:
    Aug 2008

    Posted 02 Sep 2010 Link to this post

    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.
  5. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 07 Sep 2010 Link to this post

    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
Back to Top