cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LYNCHJL
Helper II
Helper II

Expandable Gallery -- can only select first two items

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!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

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

View solution in original post

2 REPLIES 2
StormEAnderson
Resolver I
Resolver I

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.
v-siky-msft
Community Support
Community Support

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

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,217)