How to get next item in repeater by index or any other way?
e.g. in Sitecore if I'm getting the current item in repeater as
Item currentItem = (Item)e.Item.DataItem;
How can I get item which is next in the list which is given as the datasource?
Thanks Thomas ,
I got one similar approach . Declared list global and in repeater databound used :
Item currentItem = (Item)e.Item.DataItem;
int index = myList.IndexOf(currentItem);
Item nextItem = myList.ElementAt(index + 1);