Select all repeater items up to clicked item

Hello,

Trying to accomplish a color hierarchy within my repeater menu, which is generated via dataset.

By default #1 be selected.
[ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ]

If you rollover/hover on #4, 1,2,3 would change hover state to show they are connected.
If #4 is selected, then 1,2,3 would change their state color to show 1,2,3,4 are connected.

My repeater can get up to 10+ items.

Not sure the best approach for this as repeaters and datasets are new to me.

Thanks!

in general, you could do this with a “secret event” approach… in addition to the OnClick event, assign an OnMove or OnRotate event to your repeater item to handle the color changes. See this example:

repeater hierarchy.rp (99.2 KB)

Not clear how you are creating and handling the various colors and states… I took a guess… Does every row have a different color scheme, with unique colors for normal, hover, and selected states? Do you have a dynamic panel in your repeater with various colored items? Does each row have a differently colored hover state, or only differently colored selected state? If Item 4 is hovered, does 1, 2, 3 change their hover color to match item 4’s color, or would they just display their existing hover color/style? If item 4 is clicked, do 1, 2, 3 change to item 4’s color, or do they just change to their existing selected color/style?

(Seems like your question is more general than just RP9 Beta, and would apply to any version. I created this in RP8 but should work in RP9 as well.)

Thanks @mbc66 this is amazing, appreciate the help. I need to deconstruct it a bit to gather the approach but this is a huge help for me. Cheers!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.