2 basic repeaters that share the selected Index

Farah El Agha asked on November 19, 2017 17:24

Image Texthello guys, I have the same data source for 2 basic repeaters, and in the first repeater I have an owl-carousel (slider) with items of the data source, showing only the title and date of the items, I want whenever a user slide to a certain item, the text of this item will be shown in the second repeater. how can I access the selected item index of first repeater and access it in the second repeater?

Correct Answer

Brenden Kehren answered on November 20, 2017 16:20

We use the Owl carousel in a lot of projects and have a similar setup for paging. In your case, I think the title and date of the items would be the pager and the "selected index" would be the actual items.

WIth this you can take advantage of the <%# DataItemIndex %> to set a data attrubute on each element and let the owl carousel paging do the rest of the work for "selecting" and displaying the selected item.

FYI, no need to cross post to SO as they will automatically flow onto the DevNet.

https://stackoverflow.com/questions/47385867/2-basic-repeaters-that-communicate-the-same-dataitemindex/

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.