web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Convert 'regular' flec...
Power Apps
Answered

Convert 'regular' flecible gallery to flexible height

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

So I have a gallery in a canvas that was set up as a standard vertical gallery. I need it to be flexible height. What settings do i change to make it flexible height? or do i need to delete it and add a flex height in its place?

 

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    One way to do it is:

    Height = Gallery.TemplateSize*CountRows(Gallery.AllItems)

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

     

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks, That was a great help!! its working so far!

    but i am concerned that when i create a flex height gallery, this property is not set this way (it has some arbitrary value sat as the height)

    is there an underlying difference between a  flex height and an regular gallery? 

     

     

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    I am not sure I understand the concern. Whenever you create any gallery, just set the height with the above formula and you should be good. Also, if my previous reply helped you, please accept it as the solution so others can find it easily!

    Let me know in case of any questions.

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks, My concern is that when i create an out-of-the-box  flexible height gallery  the height is set to 575.  Your solution to convert a regular Vertical Gallery to a flexible height gallery as ti change the height to  galImmediateCauses.TemplateHeight*CountRows(galImmediateCauses.AllItems).

     

    That works, but it is not the same as ad the out of the box flexible height gallery and i am concerned about if it will work with future upgrades to powerapps. 

     

    I want to leave this unanswerd for a bot to see if anyone else has ideas on this.

     

    Thanks again! your solution DOES work

     

  • Verified answer
    PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    I have more confidence about a normal gallery converted into a flexible height gallery with the suggested formula.

    The out of the box flexible height gallery is very limited in features. Also, I would like to mention that the flexible height gallery doe not have the height of the gallery as flexible which is why you see it as 575. It's the template size (height of each row) which is flexible like in a social feed where some posts might be longer than others.

    So if your goal is to achieve a gallery for which the height is flexible, my suggestion might be the only way to do it!

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi , its working great but for some reason countrows(galImmediateCauses.AllItems) calculates to zero. I DO have items in the gallery.  any idea why that would be?

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Can you add a label on the screen where you have the gallery?

    Set its Text to
    countrows(galImmediateCauses.AllItems)

    Take a screenshot if possible that shows the gallery and the label.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    Glad I could help! Good luck with the rest of the app! Feel free to reach out in case of any questions!

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard