Dynamically changing a repeater (Image grid) from 5 columns to 3 columns



I have a grid of images created with the help of a repeater. (5 columns)
I have a panel that opens from the right of the page. I am looking for that panel to narrow the width of the image grid. When the panel is fully opened, the number of columns should be 3.

Thank you.


You can calulate position and move items to right place.


Not quite what is needed. The repeater needs to go from 5 columns, to 4 columns, to 3 columns.
The way I implemented it was to put the repeater in the dynamic panel and have 3 states - 5 col state, 4 col state, and 3 col state. I am not sure that this is the most efficient way of doing this.
I tried to dynamically change the size of the panel, but that did not affect the width of the repeater.


trust me ,changing position is more easier.

it doesn’t need so many repeaters or dynamic panels.


ok, can you show me how to do it?
Thank you in advance.


Demo link:

customCols.rp (63.4 KB)


Wow, this is great! Thank you so much.
Looks like I have a lot more to learn…
Where can I find such information for learning?