Expand/Collapse Repeater Question

I am stumped on this one!

I’m using a repeater to do an expand/collapse interaction for multi-row data entry. On page load, there is one row, which I want to be expanded.

When the user clicks ‘Add’ to add another row, I want the previous row to collapse, and the new row to display expanded. This should repeat for each subsequent click of ‘Add’.

Here’s a file with the starting point, and diagram of intended interaction.

Any help is greatly appreciated.

I am working on, with some success, applying a filter to the repeater on a data set column I don’t display. One filter shows the collapsed view and a different filter shows the expanded view.

Maybe something like this? I made the entire panel a dynamic panel: collapsed and expanded. Then on the repeater, OnItemLoad has a new condition that expands when OnLast equals True.

expand_collapse.rp (81.4 KB)