This project is read-only.

Alternating row color

May 22, 2015 at 1:42 PM
Hello guys,
How do you alternate row colors in your examples? (Even rows color is different from non-even row color).

Thanks in advance.
May 22, 2015 at 4:47 PM
The Good News: There IS a fairly simple way to do this.
The Bad News: It's been awhile since I worked with my last project that used Grid.MVC, and I'm having difficulty recalling exactly how I set the alternating Row color....
May 22, 2015 at 4:53 PM
Aha! This may not be exactly what you are after, but in my project I was using Bootstrap 3.0 and was (by default/accident) setting the alternating row background color as follows:
.table-striped > tbody > tr:nth-child(odd) {
  background-color: #f9f9f9;
color #f9f9f9 is just slightly darker than white to make the reading between columns easier on the eyes, but I did some experimenting in Chrome Developer Tools changing to blue/red to test and verify.

Hope it helps!
May 25, 2015 at 12:48 PM
Hello, JScurlock
Thank you very much, that worked for me. But the solution seems to be not IE-8 compatible.
May 26, 2015 at 3:49 PM
eqr, Sorry about that. Most of my Development is done in Chrome for testing and I (usually) only test IE for the Latest Version. I'm sure there is a workaround that is IE-8 compatible if that is a must have, but off the top of my head I do not know what it would be.