cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SamGibbs
Helper III
Helper III

Dyanmic height of gallery

Is there a method to dynamically set the height of a flexible height gallery? I have used flexible height as the individual items are varying sizes, but the gallery is embedded into a canvas and I wanted to avoid having seperate scroll bars for both the canvas and the gallery.

1 ACCEPTED SOLUTION

Accepted Solutions

a26.jpg

This is Template Size.

Let's say you have 10 records in gallery and your template size is 100.

CountRows(Gallery1.AllItems)*TemplateSize

This code will set your gallery height to 1000 dynamically.

 

View solution in original post

4 REPLIES 4
zmansuri
Super User
Super User

Then in gallery height property write:

CountRows(Gallery1.AllItems)*TemplateSize

 

Not sure if it this works.

Hi - thanks for responding. PowerApps doesn't seem to recognise TemplateSize. Any ideas?

a26.jpg

This is Template Size.

Let's say you have 10 records in gallery and your template size is 100.

CountRows(Gallery1.AllItems)*TemplateSize

This code will set your gallery height to 1000 dynamically.

 

View solution in original post

SamGibbs
Helper III
Helper III

Hi - thanks for the clarification. In the end it needed the gallery to be reidentified for template size so CountRows(Gallery1.AllItems)*Gallery1.TemplateSize

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,721)