If the function get_index()
is not returning the indices in a successive order, please check whether the property EnableRandomOrder
of the control is set to true
(it will scramble the items when enabled).
When calling the function AddRotatorItem
are you specifying an index, in which the new item is added (the second parameter of the function is used for this purpose)? If you are, I would suggest ensuring that you are ordering the items according to the sequence, in which you want them to show.
I have prepared a sample page with a RadRotator that performs the described functionality. Please use it as a reference for incorporating the feature into your actual project.
Note the following line in the example:
GetRadRotator().get_items()._index = 0;
It is added because there is a problem with the index of the first item that is inserted after invoking clearItems()
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 the blog feed