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 Platform Community / Forums / Power Apps / Height Problem in Flex...
Power Apps
Unanswered

Height Problem in Flexible Height Gallery while adding vertical gallery inside it (nested)

(0) ShareShare
ReportReport
Posted on by

Hello Guys,

  I am facing height issue  in each slice of the flexible height gallery while adding  a vertical gallery inside it.
even the Rows of inside gallery is fixed , still am facing some Gap in the parent gallery height.


 Preview mode its looking great , but while publishing having the height issue
(finally we deliver what we publish to the end user 🙂 )

Vertical Gallery inside the flexible gallery have fixed rows(6 )and the height i kept  - 

CountRows(Self.AllItems)*25.

I Spend almost 3 days behind this, and tried all possible ways  Please Help Me!
Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    There are two reasons a flexible height gallery will show more template height than required:

    1. The Template Height property in the parent gallery is set to a higher value than necessary, and this is treated as a minimum height
    2. There are other controls in the template that may not contain a value (and are therefore not easy to see), but the combination of their Y and Height properties push the parent template to expand to accommodate them

    Have a look to see if one of those two things is happening in your app.

     

    Hope that helps,

    Bryan

  • Power16 Profile Picture
    on at

    Hello Bryan, Thank you for the Reply. The issue not fixed yet.
    First Cell in the gallery is selected by default,  and the template height is dynamically calculated from  height of its child gallery.
    I figured out that the same height is being applied to other parent row's template height.
    Even I added the logic to parent template height to set asper the height of its child gallery's height - Its not working though.
    Attached Screenshot, if you notice first row contain 4 child rows, 4*25 =100 is the height of parent's first row, at the same time the second row of parent contain 2 child  rows(2*25=50) but it is picking the first parent's height.


    Say if I select the 2nd parent, then all the other parent row being adjusted with selected parent's template height.
    Dynamic Height is not working.

  • BCLS776 Profile Picture
    8,994 Moderator on at

    I am not quite sure where things are going wrong for you, so I've constructed what I think is the same setup and have included screenshots and code snippets to help. If the issue is that behavior is different between running in make.powerapps.com and the published app, that deserves a support ticket to Microsoft. However, check to make sure your setup works like this.

     

    Here are my resulting nested galleries:

    BCLS776_0-1711547321201.png

     

    and the controls tree that indicates how they relate:

    BCLS776_1-1711547344861.png

     

    The post editor is giving me some trouble today, so the next post will contain the code snippets

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Continuing from above, the Items property for Gallery 1 is a test table and records contain another table within:

     

    Table(
     {
     Item: 1, 
     SubTable:
     Table(
     {Value: "A"},
     {Value: "B"},
     {Value: "C"}
     )
     },
     {
     Item: 2, 
     SubTable:
     Table(
     {Value: "B"},
     {Value: "C"}
     )
     },
     {
     Item: 3, 
     SubTable:
     Table(
     {Value: "D"}
     )
     },
     {
     Item: 4, 
     SubTable:
     Table(
     {Value: "D"},
     {Value: "E"},
     {Value: "F"},
     {Value: "G"}
     )
     }
    )

     

    The Items property for Gallery 2 is the subtable:

    ThisItem.SubTable

     

    The template height for both galleries is set to 20, which is smaller than any of the controls with them, meaning as flexible height galleries each must expand to fit its contents.

     

    Finally, the Height property of Gallery2 is defined as:

    Sum(Self.AllItems, Label1.Height + Self.TemplatePadding)

     

    AutoHeight for Label1 and Label2 are set to false

     

    How does that compare to your setup?

     

    Bryan

  • Power16 Profile Picture
    on at
    Thank you BCLS776, that worked like charm. appreciate your help.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard