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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Expanding Gallery

(2) ShareShare
ReportReport
Posted on by 5,329 Super User 2025 Season 2
I have working on creating a form with multiple galleries.

I need to incorporate the ability for each gallery to expand when a new item is added that goes beyond
the current boundary.

In the example the top gallery has four items, but the fourth one is partially hidden. Is it possible to make
the height of the gallery dynamic to the number of items within them?
Categories:
I have the same question (0)
  • ANB Profile Picture
    7,250 Super User 2025 Season 2 on at
     
     

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.


    Thanks,
    ANB
  • BD-01080338-0 Profile Picture
    44 on at
    @ANB, thank you for your reply.
     
    The video provided is an excellent tutorial on 'TempleSize' height.
     
    I need to know if the height of the 'Gallery' itself can be set dynamically.
     
    In my scenario the user may have one or many items to enter into the Gallert. Unfortunately, as constructed, the Gallery only allow for the first three to be seen.
     
    The rest are only visible when using the scroll bar. This configuration all limits what us displayed when the screen to transformed into PDF and printed.
     
    I am trying to figure out if there is a way to expand thre main gallery so that it shows all items all the time, so that the PDF print will also print all the items in the Gallery.
  • ANB Profile Picture
    7,250 Super User 2025 Season 2 on at
    Hi,
     
    You can have dynamic height using below code:
    CountRows(DataSource)*Self.TemplateHeight

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.


    Thanks,
    ANB
  • Verified answer
    Phineas Profile Picture
    5,329 Super User 2025 Season 2 on at
    I figured it out using the following in the Height of the Gallery -
     
    With(
        {
            varCountRows: CountRows(
            colStockMaterialsItems)
         
        },
            varCountRows * Self.TemplateHeight + varCountRows * Self.TemplatePadding
    )

    The rectangle and Labels below the Gallery have the following, to keep up. Such formulas are also required for anything under the Gallery (with care to make sure the formula height, x and/or y apply to the correct item above).
        WO_Component_Gallery_3.Height + WO_Component_Gallery_3.Y
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard