Hello Acadia,
I am not quite sure about your setup but for the first issue you can try to set two additional properties to the RadRotator -
ItemWidth and
ItemHeight which let the rotator to determines the item's sizes.
To indicating the current item's index you can implement the following simple logic :
- attach a function to the OnClientItemShown event of RadRotator ;
- place the global variable that counts the indexes (starting from 0) ;
- get the count of the items from the rotator object (sender in my case) ;
- check if the index is equal to the count of the items then set index to 0 ;
For a demonstration purposes I attach the function
CountRotatorItems() to the
OnClientItemShown event and assign the index value to an
asp:label to show the result e.g. :
<telerik:RadCodeBlock ID="RadCodeBlock" runat="server"> |
<script type="text/javascript"> |
|
var currentItemIndex = 0; |
function CountRotatorItems(sender, arg) |
{ |
var itemsCount = sender.get_items().length; |
|
var label = $get('<%= Label1.ClientID %>'); |
label.innerHTML = currentItemIndex; |
|
if (currentItemIndex == itemsCount - 1) |
{ |
currentItemIndex = 0; |
} |
else |
{ |
currentItemIndex++; |
} |
} |
</script> |
</telerik:RadCodeBlock> |
I hope this helps!
Kind regards,
Fiko
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.