:: Forum >> Version 2 >>

Alternate Header Colors

I'm trying to have the background color the headers to alternate..

eg. Yellow, White, Yellow

I haven't been able to find anything about how to do this. Has anyone done this before?
Mike B
Friday, June 9, 2006
With the small number of header rows you can just hardcode the colors -

<style>

.
aw-header-.aw-grid-header,
.
aw-header-.aw-item-box {
    
backgroundnone!important;
    
bordernone;
}

.
aw-header-0,
.
aw-header-2,
.
aw-header-{
    
background#def;
}

.
aw-header-1,
.
aw-header-3,
.
aw-header-{
    
background#fed;
}

</
style>
<
script>

    var 
obj = new AW.Grid.Extended;
    
obj.setCellData(function(colrow){return col "." row});
    
obj.setHeaderText("header");
    
obj.setHeaderCount(5);

    
obj.setColumnCount(10);
    
obj.setRowCount(10);

    
document.write(obj);

</
script>
 
Alex (ActiveWidgets)
Monday, June 12, 2006
Thanks for the response Alex but I should have been more clear. Its one header but the columns in it need to alternate in color. But only for the Header row.
Mike B
Monday, June 12, 2006



This topic is archived.

Back to support forum

Forum search