cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Increase height of gallery while adding dynamic controls

Hi Everyone,

I am creating some dynamic controls in gallery. The controls are getting created on click at button but scroll bar appears within the gallery when more controls are added. As per feedback from users, they do not want scroll bar but increase in the height of gallery while adding controls and decrease in height of gallery of controls are deleted using another delete button. I am using scrollable using where my gallery sits. Please advise how to achieve it.

1 ACCEPTED SOLUTION

Accepted Solutions


@TiagoFreire wrote:

Or even better, you can go:

CountRows(YourGalleryName.AllItems)*(YourGalleryName.TemplateHeight)

This way, you get the flexibility of being able to modify your gallery template, and it will still work. 


Hi @Anonymous,

I would advise you to use this pattern as @TiagoFreire suggested.

The basic concept of this sultion is that the gallery height will be determined by the number of items shown in the gallery multiplied by the height of a single item (the template height).

 

Because the height of your gallery is now flexible it can mean that in case of a lot of items the height could become bigger than the available space and a part of the gallery would not be visible because it would be outside the screen bounderies. For that you need to add a some logic to maximize the height of the gallery to the available space. 

 

There are multiple ways to do this. One example is to use this formula for the gallery height property:

 

If( 
   CountRows (YourGalleryName.AllItems) * (YourGalleryName.TemplateHeight) > AvailableSpace, 
   AvailableSpace, 
   CountRows (YourGalleryName.AllItems) * (YourGalleryName.TemplateHeight)
)

 

 

View solution in original post

5 REPLIES 5
Rebetcha
MVP

Hi @Anonymous ,

 

Can you add some screenshots to clarify your question a bit?

Anonymous
Not applicable

Hi Rebetcha,

 

Please find the screenshot below

I am using plus icon (in Green box) shown in green to add new records in gallery uisng Collect function

And trash icon (right side in red box) to delete records.

Gallery.jpg

I need to increase the hieght of gallery control while clicking at plus icon and decrease the same while clicking at trash icon. Currently it intriduces scroll bar while adding new records. Disabling the scollbar of gallery does not solve the issue.

Please advise

Anonymous
Not applicable

Hi,

 

Modify the 'Height' of your gallery to:

 

CountRows(YourGalleryName.AllItems)*(Number)

 

Play around with the number in (Number) to see how much space each line item needs. Start with 20 etc.

TiagoFreire
Continued Contributor
Continued Contributor

Or even better, you can go:

CountRows(YourGalleryName.AllItems)*(YourGalleryName.TemplateHeight)

This way, you get the flexibility of being able to modify your gallery template, and it will still work. 


@TiagoFreire wrote:

Or even better, you can go:

CountRows(YourGalleryName.AllItems)*(YourGalleryName.TemplateHeight)

This way, you get the flexibility of being able to modify your gallery template, and it will still work. 


Hi @Anonymous,

I would advise you to use this pattern as @TiagoFreire suggested.

The basic concept of this sultion is that the gallery height will be determined by the number of items shown in the gallery multiplied by the height of a single item (the template height).

 

Because the height of your gallery is now flexible it can mean that in case of a lot of items the height could become bigger than the available space and a part of the gallery would not be visible because it would be outside the screen bounderies. For that you need to add a some logic to maximize the height of the gallery to the available space. 

 

There are multiple ways to do this. One example is to use this formula for the gallery height property:

 

If( 
   CountRows (YourGalleryName.AllItems) * (YourGalleryName.TemplateHeight) > AvailableSpace, 
   AvailableSpace, 
   CountRows (YourGalleryName.AllItems) * (YourGalleryName.TemplateHeight)
)

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (42,187)