Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

How to apply flexible height to all records in a flexible height gallery?

(2) ShareShare
ReportReport
Posted on by 19
Hello All,
 
I am trying to create an editable grid in PowerApps using a flexible height gallery but the template size and height seems to be affecting only the first record in the table:
 
 
 
I am using the maximum height among 3 labels+1 as as the value of the template size:
 
 
 
How do I solve this so that all records are adjusted according to the maximum height of the labels in that particular record?
  • WarrenBelz Profile Picture
    147,619 Most Valuable Professional on at
    How to apply flexible height to all records in a flexible height gallery?
    That is what I suspected and was why I continued to ask if it was a Label and also in my last post answered what you have just asked - the expanded height of the label cannot be referenced - only the height you set it at.
    If you put the label under the text input and make the text the same colour as the screen background, it should work as far as expanding the gallery but there is no autoheight setting on a text input. 
    You could try some sort of formula based on the character numbers, but this would not account for new line characters 
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Srikanth96 Profile Picture
    19 on at
    How to apply flexible height to all records in a flexible height gallery?
     
    It is a text input whose height property is set as the height of the label:
     
     
    The text label has its text property as the value of the text input, in this case:
     
     
     
    If this is not the right approach. What can I do to ensure that the height of the text input and that row dynamically increases based on the users input?
     
  • WarrenBelz Profile Picture
    147,619 Most Valuable Professional on at
    How to apply flexible height to all records in a flexible height gallery?
    Is that a Text Input or label (what do you mean by Linked )- AutoHeight only works in Labels. Also when you refer to the Height of the Label in a formula, it is the set Height in its properties, not whatever it expands to with AutoHeight - there is no way to reference this.
  • Srikanth96 Profile Picture
    19 on at
    How to apply flexible height to all records in a flexible height gallery?
     
    I have created an editable grid using the flexible gallery by inserting text inputs, date pickers and comboboxes into them. The borders are from the border thickness that is shown when their status as is set as edit mode on the click of a button:
     
  • WarrenBelz Profile Picture
    147,619 Most Valuable Professional on at
    How to apply flexible height to all records in a flexible height gallery?
    That is a strange looking gallery - where are borders coming from ?
  • Srikanth96 Profile Picture
    19 on at
    How to apply flexible height to all records in a flexible height gallery?
     
    Yes, the Text input is linked to a text label with auto height on.
     
    I have tried combinations of classic text input linked with text label:
     
    The preview does not reflect the flexible height:
     
    I have also tried modern text input linked with text label:
     
    The preview does not reflect the flexible height here as well, as you can see, even though auto height is on, the text label height is fixed to 40:
     
     
    The multiline data to simulate the expansion of the label height is shown correctly but the height just does not dynamically increase even though the auto height property is set to 'True':
     
  • WarrenBelz Profile Picture
    147,619 Most Valuable Professional on at
    How to apply flexible height to all records in a flexible height gallery?
    So that is definitely a Classic Label with the AutoHeight set to true linked to a Text field in the data source (ThisItem.TextFieldName)? I cannot duplicate your error here - it works fine with those elements.
  • Srikanth96 Profile Picture
    19 on at
    How to apply flexible height to all records in a flexible height gallery?
     
    I have changed the template size to a fixed value but the label does not change it's height dynamically in the published application:
     
     
    Published application:
  • WarrenBelz Profile Picture
    147,619 Most Valuable Professional on at
    How to apply flexible height to all records in a flexible height gallery?
    Assuming that is a Classic Flexible Height Gallery and the control concerned is a Classic Text Label with AutoHeight set to true, it should work - I use this structure quite extensively in prod apps with no issues. The only thing I can see different on yours to a controI have is the Overflow is set to Scroll on mine, however I could not reproduce what you have setting mine back to Hidden.
    You do however need to set that TemplateSize back to a static value - the smallest you need for a single line in the labels.
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • Srikanth96 Profile Picture
    19 on at
    How to apply flexible height to all records in a flexible height gallery?
    Thank you for the reply.
     
    The Autoheight has been set to true:
     
     
     
    Even with the Autoheight set to true (for the column named Remarks), it's not reflecting in the Published application:
     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >