CoverFlowButtons buttons not enabling properly

2 posts, 0 answers
  1. PaulH
    PaulH avatar
    40 posts
    Member since:
    Mar 2011

    Posted 06 Mar 2013 Link to this post

    Hi there.

    I'm using a Rotator set in CoverFlowButtons mode and on the whole it works fine. However, I have a situation whereby the current index of the rotator gets changed by some javascript code based on an external condition. When the index changes from the first item to any other item in the collection the previous button doesn't get enabled. If my code changes the index to the last item in the list I also find that the next button doesn't get disabled. However, if I interact directly with the rotator by clicking on one of the items or by clicking the next button while there is a next item to go to the enabling and disabling of the buttons then happens correctly. It's just the initial entry to the form and manipulation of the rotator via the javascript prior to actually doing something manual with it where the issue manifests itself. Is there something I can or should do to ensure that the buttons disable and enable correctly or is this a fault that you can fix?

    The actual code I use to change the relevant item is as follows:
    if (itemIndex != -1) {
        var coverFlow = $find('<%= CoverFlow.ClientID %>');
        $(coverFlow.set_currentItemIndex(itemIndex, false));
    The "itemIndex" is a value that is calculated initially based on certain conditions.

    Thanks and regards
  2. Slav
    Slav avatar
    1359 posts

    Posted 11 Mar 2013 Link to this post

    Hello Paul,

    Truly, the enabled/disabled state of the RadRotator's control buttons is not applied correctly when the function set_currentItemIndex(index) is used before the items of the CoverFlow rotator are scrolled. This issue will be brought to the attention of our developers, nevertheless I cannot provide a firm estimate when a fix will be available. You can track the status of the bug, comment it and vote for it via the feedback item that I logged.

    For the time being you can workaround the problem by programmatically initiating a scroll via the showNext client-side method of RadRotator as shown below:
    <script type="text/javascript">
        // OnClientLoad event handler
        function RotatorLoad(sender, args) {
            var rotatorDirection = Telerik.Web.UI.RotatorScrollDirection;
            sender.set_currentItemIndex(3, false);

    I have updated your Telerik points accordingly as a token of gratitude of reporting the problem.

    All the best,
    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.
Back to Top