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

Is Gallery.TemplateWidth a read only item?

(0) ShareShare
ReportReport
Posted on by 15

 

I have a button with the "OnSelect" set to:

  • Gallery1.TemplateWidth = 200

 

When I press the button, nothing happens.

Is the Gallery.TemplateWidth and Gallery.TemplateHeight read-only fields?

 

Thanks,

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @GroovyMisfit 

    You cannot set properties in PowerApps with a formula explicitly.  All properties derive their values by formulas in the property itself.

     

    Template Width and Height are not exposed as properties on the gallery that you can add a formula to.  This is because those properties derive their values based on multiple factors of the gallery design (i.e. wrap count, padding, etc.)

     

    The TemplateHeight and Width should only be used to reference their values in other formulas.

     

    You can set the TemplateSize property with a formula in it, but it will only impact the width or height of the template depending on the multiple factors of the gallery design.


    What is it you are trying to accomplish?  You can certainly set a formula in the Height and Width of the gallery itself.

     

    I hope this is helpful for you.

  • Verified answer
    Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    One thing to add to @RandyHayes reply.  TemplateSize is essentially the same thing as TemplateHeight or TemplateWidth depending on the type of gallery you choose.  For a vertical gallery TemplateSize is the height of the template.  Width is the Width of the gallery.  For a horizontal gallery its the opposite, TemplateSize is the width of the template and Height is based on the gallery.

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 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard