:: Documentation >>

Alternate colors

Just assign different colors to odd/even rows with CSS -

.aw-alternate-even {background: #fff;}
.aw-alternate-odd {background: #eee;}

It is possible combining column and row colors -

#myGrid .aw-alternate-even {background: #fff;}
#myGrid .aw-alternate-odd {background: #eee;}

#myGrid .aw-alternate-even .aw-column-1 {background: #eee;}
#myGrid .aw-alternate-odd .aw-column-1 {background: #ddd;}

You can also change how 'odd'/'even' values are calculated, for example, coloring rows in groups of 3 (triplets) -

function triplets(){
    return this.getRowProperty("position") % 6 < 3 ? "even" : "odd";
}

obj.getRowTemplate().setClass("alternate", triplets);

Comments

Changing color of a particular row (3)
Odd Even vs Triplets.... G Cayman (4)

Documentation:

Recent changes:

2.6.4
2.6.3
2.6.2
2.6.1
2.6.1
2.6.0
2.5.0 - 2.5.6
2.5.6
2.5.0 - 2.5.5
2.5.5