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

Expandable Gallery -- can only select first two items

(0) ShareShare
ReportReport
Posted on by 113

Hello,

 

@v-siky-msft kindly helped with building an expander gallery but for some reason I can only select and open the first two items in the expanded group.  I think it may have something to do with the height of the subgallery or main gallery.  This is what I have for the heights. 

 

MainGallery Height:  564

SubGallery Height:  If(expandCollapse && ThisItem.IsSelected,CountRows(ThisItem.Grouped)*80,05)

 

When I change the subgallery height to 500, for example, the groups do not collapse, but I can select all the items.

 

Any ideas or suggestions?

 

Many thanks!

 

 

Categories:
  • StormEAnderson Profile Picture
    60 on at

    There may be two things going on:

    1. The Main Gallery is not a flexible-height gallery and is instead a standard gallery. The Standard gallery is going to restrict the visibility of the subgallery items based on the mainGallery.templateSize property. This can be okay if you always want the subGallery to only show 5 items at a time tops and then scroll when there are more but IMO the flexible-height gallery has a cleaner presentation to just expand all-the way to show all the items.
    2. If the main gallery is in fact a flexible height gallery, then the next thing could be that subGallery.templateSize is not configured to properly display all the content. The mainGallery templateSize now doesn't matter because the flex-height just changes per row of the master gallery based on it's content height so the content now governs how much space it needs. Based on your formula it seems like you want the subGallery row item to be a height of 80px so make sure that subGallery.templateSize is equal to 80.
      1. I would also set subGallery.templatePadding to 0 because this cause the scrollbar to appear when you don't want it to, otherwise adjust the subGallery.height and subGallery.templateSize to account for the padding.
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @LYNCHJL ,

     

    It seems that the items at the bottom of sub-gallery cannot be selected due to the gallery is not high enough.

     

    The height of sub-gallery is configured by 'CountRows(ThisItem.Grouped)*80' code, that means the unit items height is 80, the total sub-gallery height is Unit height times the number of items. The advantage is that each sub-gallery Height is not fixed, depending on the number of Items.

    If you want to increase the sub-gallery height, just try to increase the unit item height, e.g. increase from 80 to 160. 

    If(expandCollapse && ThisItem.IsSelected,CountRows(ThisItem.Grouped)*160,05)

    Or Use the Fixed Height, e.g. 500

    If(expandCollapse && ThisItem.IsSelected,500,05)

    Hope this helps.

    Sik

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard