Force Row Color In Data Grid


#1

I needed to show grouping in the data grid control, so I added panels of different colors for the group rows. However, when I do this the alternating row color is not working like I want it.

We always need the 1st row under the groups to be white, then the alternate row color will be grey.

Is there any way to force each rows color like how we can force column widths?

Example: {#ffffff,#ffffff,#ffffff,#ffffff,#e3e3e3,#ffffff,#ffffff,#ffffff}

The above would allow me to set the row colors based on where my grouping rows appear.

If not, then it would be a handy feature to add. :slight_smile:


#2

Hey again, @CMT :slight_smile:

While there isn’t a way to specify row colors beyond the alternating colors, you can cheat a little and accomplish what I think you’re looking for.

If you overlay a partially transparent rectangle over the rows you wanted to group, you should be able to achieve this. You will have to play with the colors a little as e3e3e3 at 25% opacity is much lighter than e3e3e3 at 100% opacity.

I’ll take this suggestion back to the team, and we will talk about it :). Let me know if this workaround works for you.