cancel
Showing results for 
Search instead for 
Did you mean: 

Ability to display alternate row colors within a gallery

One cool thing is include the ability to produce alternate colors on rows within a gallery to give more life to the UI. Just an idea

Status: New
Comments
Level 10

Nice Idea. Maybe easy to achieve by adding a rownummer property to the Template of a gallery. In this way you can also do three colors or four colors, etc.

Level 8

Say odd numbers as grey and even numbers as light blue something like that.

Level: Powered On

Till the time use this idea.

  1. Edit a gallery item row -> set the Gallery Template, Inserted Shape, or Any TextBox or Shape, to set the FILL or Colorwith: OR
  2. use "TemplateFill" of gallerytemplate 

and add:

If(Mod(Value(ThisItem.ID),2)=0, Color!Aqua, Color!AliceBlue)

 

Courtsey: @hpkeong@mr-dang@Audrie-MSFT

https://powerusers.microsoft.com/t5/General-Discussion/Useful-Features-of-PowerApps-13-Gallery-with-...

 

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Provide-properties-in-Gallery-control-to-specify...

Level: Powered On

I did one after following the steps shared above:

 

used the TemplateFill property of the gallery control

If((DateDiff(Now(),ExpirationDate) <= 3) And (DateDiff(Now(), ExpirationDate) >= 0) ,Color.Pink, (DateDiff(Now(),ExpirationDate) > 3) And (DateDiff(Now(),ExpirationDate) < 20) , RGBA(255, 255, 204,1),(DateDiff(Now(),ExpirationDate) > 20), Color.PaleTurquoise, (DateDiff(Now(), ExpirationDate) < 0), RGBA(192,192,192,1))
Level: Powered On

This would be a great feature to have.

 

The workaround that dhawalseth posted doesn't work when you have filtered the gallery because you're going to be missing some IDs, so instead of a nice list going 1,2,3,4,5,6 - you get something going 1,2,3,5,7.8 - which means you're not going to get alternate row colors.

Level: Powered On

Dear @seraph787,

I agree on the suggestion that RowId's don't work as we have to sort and filter. 

 

Just for a suggestion, I implemented it without "RowId's" i.e. based on "expiration date" in my case. Choose your case wisely.

 

Cheers, thank you for the feedback.