Expandable repeater tree

repeater-widget

#1

Is it possible to create a tree widget using repeater where it has the typical expand/collapse capability at each node? I can’t figure out how I can control the visibility of individual items from other generated items. Maybe it just can’t work this way, but I have the tree otherwise indenting properly and would appreciate any direction.

Thanks
Tree.rp (159 KB)


#2

Yes. Check attached.
table_expanded.rp (85.7 KB)


#3

That was close, but you are showing/hiding a named widget. My problem is that I am trying to target the visibility of other rendered items in a repeater. I am not sure how/if that can be done. Thank you though - I was looking at one of the samples you posted from a different thread yesterday, very cool stuff!


#4

you already have a column item.parent.

add a column item visible.
when the parent is clicked you update this column for the childs and toggle between true and false or 1 and 0… whatever you like.

in the onLoad event of the you set a filter that filters the shown and the hidden will disapear.


#5

Can this be achieved within the same column with filters? Sorry, repeater filters are still mystery to me.
tree_wRepeater.rp (93.7 KB)


#6

Trying to do the tree with a single column. Expansion works, but I can’t get the subsequent items (level 2 and 3) indented.
tree_wRepeater_external.rp (89 KB)


#7

Hi nightern,

One possible change would be to move the Move actions from the repeater widget’s OnLoad event onto the OnItemLoad event. That way, each time that a repeater item loads, the condition will have each instance of the shape (and corresponding value) to target as a referent. Here’s an edited copy of the project:

tree_wRepeater_external_EDIT2.rp (88.2 KB)

Hopefully that helps!


Parent and child tree with repeaters
closed #8

unlisted #9