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

Disabling up/down arrows in Rotator

1 Answer 55 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Uday
Top achievements
Rank 1
Uday asked on 26 Apr 2011, 02:58 PM
Hi,

I have set the height of the rotator and this would accommodate 3 items. If the list that I am binding contains <= 3 items then the up and down arrows should be disabled. How can I achieve this.

TIA,
Uday

1 Answer, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 26 Apr 2011, 05:23 PM
Hello Uday,

The best solution would be to attach to the OnClientLoad event of the RadRotator and check the length of the items collection. If the length is less than, in your case, 3, then hide the buttons. Hiding the buttons is easily done through the jQuery library. Here is an example implementation of the OnClientLoad handler:
function hideUselessButtons(rotator, args)
{
    if(rotator.get_items().length < 3)
        $telerik.$(".rrButton").hide();
}

Hope this helps.

All the best,
Niko
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Rotator
Asked by
Uday
Top achievements
Rank 1
Answers by
Niko
Telerik team
Share this question
or