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
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.
Say odd numbers as grey and even numbers as light blue something like that.
Till the time use this idea.
If(Mod(Value(ThisItem.ID),2)=0, Color!Aqua, Color!AliceBlue)
Courtsey: @hpkeong, @mr-dang, @Audrie-MSFT
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))
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.
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.
The following blog post details a clever way of getting sequential row numbers.
This could be combined with the method above for alternate shaded rows.
Thanks. Useful thread.Done it by using a sequential number in data and applied Mod function with 2 to determine odd/even and applied different Template fill property for odd and even by an if condition.Thanks
Galleries need an inherent Index property to represent rows, so that we do not have to modify Collections to include an Index. Then the gallery can have properties per Index - like font or color etc.
@klelsz provided a good idea.
it has been two years, any actions or plan?