Make the amount of columns of Gallery dynamic - Mendix Forum

Make the amount of columns of Gallery dynamic

0

For example if I have weekdays that are active or inactive, I would like the gallery to show the entries for the weekdays that are active. Now I have to choose 7 columns if I want my gallery items to show horizontally as a list of 7 weekdays for example.

But if I have one active weekday less I have a list with 6 items, but still 7 columns. I'd like to use the space responsively that the 7th column is taking but I currently can't set it to 6th columns because there are cases in which all 7 weekdays are active or less than 6 weekdays are active. I want to use this same gallery for all cases and not make 7 different galleries to account for each use case to not have weird white space for empty columns on the screen.

That's why I'd like it if the columns could somehow dynamically be set, for example based on an integer attribute or something like that.

asked
0 answers