Row Highlighting
In the following code, can anyone see a way to make the aw-rows-selected propery be dominant? Basically on my red rows, if I select one, I want it to turn blue like the rest. Do I need to change the way I define the row/cell colors? Thoughts? I thought the !important tag would do it, but it appears not.
<html>
<head>
<script src="/ActiveWidgets/runtime/lib/aw.js"></script>
<link href="/ActiveWidgets/runtime/styles/aqua/aw.css" rel="stylesheet"></link>
<style>
#obj { width: 400px; height: 300px; }
#obj .aw-grid-row {height: 20px; border-bottom: 1px solid #ccc;}
#obj .aw-alternate-even {background: #fff;}
#obj .aw-alternate-odd {background: #eee;}
#obj .aw-mouseover-row {background: #c0c0c0;}
#obj .aw-mousedown-row {background: #999;}
#obj .aw-rows-selected {background: #316ac5!important; }
</style>
</head>
<body>
<script>
var obj = new AW.UI.Grid;
obj.setId('obj');
obj.setHeaderText("header");
obj.setCellText("cell");
obj.setColumnCount(3);
obj.setRowCount(12);
obj.setSelectionMode("single-row");
obj.defineCellProperty("bgcolor", function(col, row){
if (row % 4 == 0) {
return 'red';
}
});
obj.defineCellProperty("color", function(col, row){
if (row % 4 == 0) {
return 'white';
}
});
obj.getCellTemplate().setStyle("background-color", function(){
return this.getControlProperty("bgcolor");
});
obj.getCellTemplate().setStyle("color", function(){
return this.getControlProperty("color");
});
document.write(obj);
</script>
</body>
</html>
Mike
May 10,