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 / Dynamic Height for Nes...
Power Apps
Unanswered

Dynamic Height for Nested Galleries with dynamic content

(1) ShareShare
ReportReport
Posted on by 187

Hello,

 

I'm working on a Power Apps canvas project. I have a data source in a "Parent > Child > Sub-child" format. Initially, I wanted to have 2 nested galleries, but I saw that this wasn't possible, so I have a parent gallery with a child gallery, and in this child gallery a ListBox with "SubChild" elements.

My problem is that I can't get all this with the automatic heights, despite the fact that I've tried to follow quite a few tutorials.

I set the ListBox Height to "(CountRows(ThisItem.SubChild) * 41)" which works perfectly, but I can't do it properly with the galleries, as the number of Child and Sub-child varies and flexible galleries doesn't seem to do the job automatically.

 

Your help will me very much appreciated!

Thank you in advance,

Charles

Categories:
I have the same question (0)
  • CharlesPP Profile Picture
    187 on at

    Small update if you need more indications about where am I.
    It's pretty close using a flexible height gallery for ParentGallery and a classic gallery for ChildGallery with the "Height" property: "CountRows(Self.AllItems) * (Self.TemplateHeight + Self.TemplatePadding) + Self.TemplatePadding". But the problem concerns the "TemplateSize" property of the ChildGallery.
    Well, maybe that's not the solution.

  • FC-02051025-0 Profile Picture
    13 on at

    Hello @CharlesPP any update on this subject? I'm having the same problem here. How did you solved it?

     

    Thanks!

  • CharlesPP Profile Picture
    187 on at

    Hi @FCLucena , I haven't found an optimal solution to this problem.

    In the end, I proceeded by averaging the occupied size (let's say 100) and adding a margin (which gives a total of lets say 110). I've also taken a margin in the case where the first element is large.

    This gives a height like this: 100 + [number of elements] x 110


    This simply results in a page with white at the bottom, which isn't too bad in my case.
    Good luck!

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard