Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

independent template size in gallery, nested gallery

Posted on by 35

Hi, I can't make independend template size in main gallery which is depended on nested gallery side on button click.. Can't find solution fro hours 😞 

 

ShpxLbh_0-1669370965627.png


Main gallery templatesize is:

ShpxLbh_1-1669370994689.png


nested gallery is full with data on click:

ShpxLbh_3-1669371054538.png

and set height depend on button click..

ShpxLbh_2-1669371039648.png


But every template is the same, how to make individual row height?

Categories:
  • sgtsnacks64 Profile Picture
    sgtsnacks64 322 on at
    Re: independent template size in gallery, nested gallery

    Hey ShpxLbh,

     

    what about something like this using a Blank Flexible Height Gallery:

     

    Using a collection like this:

    ClearCollect(
     collection,
     Table(
     {
     Title: "1",
     Fill: Color.Blue,
     MakeBig: false
     },
     {
     Title: "The Quick Brown Fox Jumps Over The Lazy Dog",
     Fill: Color.Yellow,
     MakeBig: false
     },
     {
     Title: "Cheddar Cheese",
     Fill: Color.Red,
     MakeBig: false
     }
     )
    )

     

    We can use the MakeBig boolean value to control the height of a label in the gallery.

     

    sgtsnacks64_0-1669372990618.png

    Code in the Button (Although this could be anything OnSelect-y

     

    UpdateIf(collection,ThisItem.Title = ThisRecord.Title,{MakeBig: !MakeBig})


    The Label control then has its height defined by the variable:

     

    If(ThisItem.MakeBig,40,100)

     

    I've used a label as an example here, but it can also be blank:

     

    sgtsnacks64_1-1669373143336.png

     

    One caveat is you'll need to define the Height/Y co-ordinates of objects based on the state of the boolean value.

     

    A nested gallery, for example, could have its Height (Not it's template height) defined by the parent collection.

     

    Hope this helps you out 🙂

     

  • Verified answer
    TN-12111106-0 Profile Picture
    TN-12111106-0 35 on at
    Re: independent template size in gallery, nested gallery

    resolved. you have to use flexible gallery for that, You can't make it on standard gallery, even with some coding inside - it isn't work so good and smooth like on flexible 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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard