:: Forum >> Version 2 >>

Odd Even vs Triplets....

More information on this topic is available in the documentation section: /grid.howto.rows/alternate-colors.html.

I can see the nice Odd - Even abilities.... for Grid coloring... Is there support for a way to do Threes of one color then three of another...?
I think most accounting applications do this for ease of following accross with the eye...
Is there possibly a way to easily do that currently?

G Cayman
Tuesday, January 31, 2006
Nope, don't think that is possible with just style sheets, you would have to write some script to handle that.
Tony
Tuesday, January 31, 2006
everything is possible :-)

.aw-alternate-even {
    
background#eeeeee;
}

.
aw-alternate-odd {
    
background#ffffff;
}
 
plus some script

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

obj.getRowTemplate().setClass("alternate"triplets);
 
Alex (ActiveWidgets)
Thursday, February 2, 2006
Well, that is exactly like something I meant when I said could be done in JS. I just don't know all the methods and API calls yet to provide solutions all the time. Very impressive Alex.
Tony
Thursday, February 2, 2006
Oh OH my that is NICE and, um clever too!
good grief!

thanks -g
G Cayman
Thursday, February 2, 2006



This topic is archived.

Back to /grid.howto.rows/alternate-colors.html

Documentation:

Forum search