The RadRotator has three methods that allow the developer to manage the control's items on the client-side.
-
addRotatorItem(radRotatorItemData, index) - adds a new item to the RadRotator's client-side item collection at the specified index. The HTML markup of the new items is configured in the Html property of the radRotatorItemData object that is passed to this method. If the radRotatorItemData parameter is not specified, an empty item will be inserted. If the index parameter is not set, the new item will be added at the end of the collection.
radRotatorItemData = {
Html:
"<div>Item's content</div>"
};
-
removeRotatorItem(index) - removes an item from the RadRotator's client-side item collection. If the index parameter is not set, the last item from the collection will be removed.
-
clearItems() - clears the RadRotator's client-side item collection
Important: The changes, made via these methods, will affect only the client-side items collection and they will not be persisted on the server. The listed client-side methods are supported for all RadRotator modes, except CoverFlow and Carousel
This example illustrates how to use the RadRotator's Client API items management functions.