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 / Increase height of gal...
Power Apps
Answered

Increase height of gallery while adding dynamic controls

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Everyone,

I am creating some dynamic controls in gallery. The controls are getting created on click at button but scroll bar appears within the gallery when more controls are added. As per feedback from users, they do not want scroll bar but increase in the height of gallery while adding controls and decrease in height of gallery of controls are deleted using another delete button. I am using scrollable using where my gallery sits. Please advise how to achieve it.

Categories:
I have the same question (0)
  • Rebetcha Profile Picture
    645 on at

    Hi @Anonymous ,

     

    Can you add some screenshots to clarify your question a bit?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Rebetcha,

     

    Please find the screenshot below

    I am using plus icon (in Green box) shown in green to add new records in gallery uisng Collect function

    And trash icon (right side in red box) to delete records.

    Gallery.jpg

    I need to increase the hieght of gallery control while clicking at plus icon and decrease the same while clicking at trash icon. Currently it intriduces scroll bar while adding new records. Disabling the scollbar of gallery does not solve the issue.

    Please advise

    Gallery.jpg
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    Modify the 'Height' of your gallery to:

     

    CountRows(YourGalleryName.AllItems)*(Number)

     

    Play around with the number in (Number) to see how much space each line item needs. Start with 20 etc.

  • TiagoFreire Profile Picture
    313 on at

    Or even better, you can go:

    CountRows(YourGalleryName.AllItems)*(YourGalleryName.TemplateHeight)

    This way, you get the flexibility of being able to modify your gallery template, and it will still work. 

  • Verified answer
    Rebetcha Profile Picture
    645 on at

    @TiagoFreire wrote:

    Or even better, you can go:

    CountRows(YourGalleryName.AllItems)*(YourGalleryName.TemplateHeight)

    This way, you get the flexibility of being able to modify your gallery template, and it will still work. 


    Hi @Anonymous,

    I would advise you to use this pattern as @TiagoFreire suggested.

    The basic concept of this sultion is that the gallery height will be determined by the number of items shown in the gallery multiplied by the height of a single item (the template height).

     

    Because the height of your gallery is now flexible it can mean that in case of a lot of items the height could become bigger than the available space and a part of the gallery would not be visible because it would be outside the screen bounderies. For that you need to add a some logic to maximize the height of the gallery to the available space. 

     

    There are multiple ways to do this. One example is to use this formula for the gallery height property:

     

    If( 
     CountRows (YourGalleryName.AllItems) * (YourGalleryName.TemplateHeight) > AvailableSpace, 
     AvailableSpace, 
     CountRows (YourGalleryName.AllItems) * (YourGalleryName.TemplateHeight)
    )

     

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard