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 / Gallery TemplateSize i...
Power Apps
Answered

Gallery TemplateSize issue

(0) ShareShare
ReportReport
Posted on by 272

I am following a video by Reza Dorrani regarding responsive gallery.  I have a container that I added to my screen and inside of the container, there is a gallery.  When I try to get my gallery to adjust to the height of the 'Tab Container'(Parent.Height) as shown in the video, it doesn't work.


Empty 'TabContainer'

theisogunro_1-1676902996029.png

 

 

 

When I add the gallery and adjust the TemplateSize.

theisogunro_0-1676902866659.png

 

 

Any idea why it isn't working as shown in the video and how to fix?

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @theisogunro,

     

    You mentioned you want to set the height of the Gallery. Don't you want to use the Height property instead of the TemplateSize property then? The TemplateSize property sets the amount or "real estate" per item in the gallery whereas the Height property sets the height of the gallery.

  • theisogunro Profile Picture
    272 on at

    I was just following the tutorial.  In the video, it shows the templatesize being used.

  • MS_Gonzo Profile Picture
    70 on at

    I had the same issue two weeks ago, following the same tutorial. 

    I changed the Height property to parent.height and the templatesize property to 

    (Parent.Width/CountRows(colTabs))-7 which works for my purposes. However, I do have a persisiting warning in my app the I there is an invalid operation divide by zero. I do not know if this is the origin of this message, but doubt it. Why -7. Literlly trial and error. -6 didn't fit right and -8 neither. 

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @theisogunro ,

     

    I just had a quick go at it myself and whilst it looks visually as if the gallery is overlapping with the container beneath, when selecting a the template, not the whole gallery, everything fits exactly in the container:

     

    BCBuizer_1-1676928354053.png

     

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @MS_Gonzo ,

     

    Why use the width to set the TemplateSize (= height of the template in a vertical gallery)?

  • theisogunro Profile Picture
    272 on at

    @BCBuizer, did you try with content in the cells of the gallery?  

     

    Before I change the TemplateSize:

    theisogunro_0-1676929254156.png

     

    After I change the TemplateSize:

    theisogunro_1-1676929320897.png

     

     

    In the video I was watching, when the TemplateSize was set to Parent.Height, the gallery didn't squish together like it did in mines as shown above.  It showed only one item and then when he added CountRows(colTab) to the WrapCount property, all the logos showed.  Mines behaved totally different.

    theisogunro_2-1676929611184.png

     

    Could you follow the vide instructions and see if you get what Reza got in his video?

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @theisogunro ,

     

    Could it be you are using a horizontal gallery instead of a vertical one?

     

    In the below picture you can see two galleries with the exact same settings inside identical containers. The only difference between the two is that the top one is a horizontal gallery and the bottom one a vertical gallery.

     

    BCBuizer_0-1676981414144.png

     

    I see some similarities between your screenshots and this picture, hence I'm asking.

  • theisogunro Profile Picture
    272 on at

    I was using what was shown in the video.  He used a horizontal container and that's what I'm using as well.  In what you have created, do you have TemplateSize set to Parent.Height for the gallery and set the wrapcount to CountRows(tabData)?  When I set these two as shown in the video, I get different results.

  • theisogunro Profile Picture
    272 on at

    @BCBuizer 

     

    I watched the video very carefully and I see where the difference is and where I'm going wrong but not sure how to fix.

     

    Around 16:55, he clicks on the edit icon to edit the template of the gallery.  When he clicks it, the outline of the gallery is shown and then he adds a label and a couple of other controls.  When I click the icon, a cell is highlighted for me and not the whole gallery by itself.

    Reza's gallery after clicking pencil to edit:

    theisogunro_1-1677071396754.png

     

     

     

    My gallery after clicking pencil to edit

    theisogunro_2-1677071455025.png

     

    I think I missed a property.  Do you know what that may be?  Thanks!

     

  • Verified answer
    BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @theisogunro ,

     

    Found this in the comments to the video:

    BCBuizer_0-1677072004252.png

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard