3.2.0

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
June 9,
With the small number of header rows you can just hardcode the colors -

<style>

.aw-header-0 .aw-grid-header,
.aw-header-0 .aw-item-box {
    background: none!important;
    border: none;
}

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

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

</style>
<script>

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

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

    document.write(obj);

</script>
Alex (ActiveWidgets)
June 12,
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
June 12,

This topic is archived.

See also:


Back to support forum