Repeating Group show/hide columns with its width options and adjust the RG's width automatically by button outside RG

I want to rearrange the repeating groups based on the columns selected. I have separate popup named as settings. There I mentioned, which columns should show and which columns should hide. Based on these settings (the settings popup is outside the repeating group and its parent group), the repeating group’s width should adjust automatically and selected columns should display there. In addition, I can give the width of the columns in the settings popup. Based on the width, the column’s width should adjust in the repeating group.

Look into the forum for other posts like this. Basic answer is it’s hard, but there are work arounds i believe. They can collapse down, not left to right without some work.