Alternate row color in DataGrid per DataGridColumn
The idea came from a flexcoders post here. After attempting the previous example of row background colors in ADG I thought it should be easy to achive this which resulted in this post.
I extended the DGColumn and added a "alternatingItemColors" style it so that it would be possible to set it per column.
I extended the DGItemRenderer and used the background and backgroundColor properties to set the items background color. I added logic in a overridden validateNow function to pick up the color from the alternatingItemColors color array.
The drawback of this approach is that the selection feedback gets almost hidden by the background coloring which would not be the case if the drawRowBackground function is overridden.
The result :
The source is available here.
9:29 AM
|
Labels:
Flex DataGrid Samples
|
This entry was posted on 9:29 AM
and is filed under
Flex DataGrid Samples
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 comments:
Post a Comment