Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Rotator > selected index?
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

selected index?

Feed from this thread
  • Posted on Mar 13, 2007 (permalink)

    (using RadRotator 2.5)

    In a nutshell, how can the RadRotator to "freeze" when an item is clicked? I have autopostback="true" (so I can capture the ItemClicked event on the server-side), and every time I click on the item, the RadRotator returns to the first item in the list (of items).  I'm setting the datasource for the RadRotator only if the page isn't a postback ( if (!Page.IsPostBack) ).

    <radR:RadRotator ID="RadRotator1" runat="server"
                            AutoPostBack="True"                     OnItemClicked="RadRotator1_ItemClicked"                         
                            AutoAdvance="false"                         
                            FramesToShow="2"
                            Width="400"
                            Height="100" 
                            FrameTimeout="0"
                            TransitionType="Scroll"
                            ScrollDirection="left"
                            ScrollSpeed="2"
                            UseSmoothScroll="True">

    Thanks,

    Mark
    Chief Geek
    Goolara, LLC

  • Posted on Mar 14, 2007 (permalink)

    In the ItemClicked postback event handler, you can get the index of the frame using e.Item.ItemIndex, for example:

    protected void RadRotator1_ItemClicked(object o, Telerik.WebControls.RadRotatorClickEventArgs e)
        {
            int frameIndex = e.Item.ItemIndex;
        }

  • Posted on Mar 14, 2007 (permalink)

    Sure, now I've got the index captured -- but how do I set the RadRotator to a specific frame?

    Thanks,

    Mark

  • Peter Peter admin's avatar

    Posted on Mar 14, 2007 (permalink)

    Hello Mark,

    Unfortunately, you can not set the rotator to a specific frame. We will try to take care of this limitation in the next major version of the control.

    Best wishes,
    Peter
    the telerik team

  • Kevin Master avatar

    Posted on Mar 14, 2007 (permalink)

    Not built in the product, but you can still do it. It will require additional code though. You need to reorder your datasource (e.g. SqlDataSource, DataTable, ArrayList, etc) to start with the frame you want and then rebind the rotator in the ItemClicked event handler.

  • Fergus avatar

    Posted on Aug 20, 2008 (permalink)

    Has this feature been added yet. I would like to change the index of the radrotator to a specific index without rebinding to a datasource when i hover over a specific button below the rotator.

  • Georgi Tunev Georgi Tunev admin's avatar

    Posted on Aug 20, 2008 (permalink)

    Hello Fergus,

    In RadRotator for ASP.NET AJAX we have the InitialItemIndex property which specifies the index of the item, which will be shown first when the rotator loads.

        * When set to 0 (default) - positions initial item to be visible in the rotator.
        * When set to -1 - positions the initial item just outside of the rotator viewport.

    Any other positive value - the rotator starts with that particular item in the viewport.



    Greetings,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  • Fergus avatar

    Posted on Aug 20, 2008 (permalink)

    Thanks for reply. So then it is not possible for it to be changed from the client side with javascript?

  • Georgi Tunev Georgi Tunev admin's avatar

    Posted on Aug 21, 2008 (permalink)

    Hello Fergus,

    Currently this is not possible, but I logged this as a feature request in our database and we will try to implement it for one of the following updates.

    Your points were updated.

    All the best,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  • Mike avatar

    Posted on Dec 13, 2010 (permalink)

    Just curious if this was ever added to the Ajax rotator. If so how do you change the rotator image by passing a index value.. Say 2? Also how would you get the index count of rotator to make sure there are 3 items and an error is not thrown.

    Thanks!

  • Fiko Fiko avatar

    Posted on Dec 15, 2010 (permalink)

    Hi Mike,

    This feature already exists in RadRotator for ASP.NET AJAX and you can explore it in action in this online demo.

    Best wishes,
    Fiko
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Rotator > selected index?