new bug in grid?
Hi,
here is an exemple of a code that doesn't work. I try to change from a button the color of a row. if i set once the color with "obj.getRowTemplate(1).setStyle("background","red");", i can't set it again... Why?
here's the code :
<html>
<head>
<TITLE>Manuel des echecs Aude sur IP</TITLE>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/xp/aw.css" rel="stylesheet"></link>
<style>
#myGrid .aw-alternate-even {background: #fff;}
#myGrid .aw-alternate-odd {background: #eee;}
#myGrid .aw-rows-selected {background: #316ac5;}
#myGrid .aw-grid-headers {color: blue}
#myGrid .aw-row-selector {width: 40px; text-align: left}
#myGrid .aw-row-1 {background: #FF0000}
</style>
<script>
var obj = new AW.Grid.Extended;
var button = new AW.UI.Button;
obj.setId("myGrid");
button.setId("button");
button.setControlText("clic me for color yellow");
obj.setControlSize(800, 250);
obj.setCellText(function(i, j){return j + "-" + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(10000);
// I set the color once :
obj.getRowTemplate(1).setStyle("background","red");
document.write(obj);
document.write(button);
button.onClick = function(text){
// when i set another time (from a button), it doesn't work!!!
obj.getRowTemplate(1).setStyle("background","yellow");
obj.refresh();
};
</script>
</body>
</html>
here is an exemple of a code that doesn't work. I try to change from a button the color of a row. if i set once the color with "obj.getRowTemplate(1).setStyle("background","red");", i can't set it again... Why?
here's the code :
<html>
<head>
<TITLE>Manuel des echecs Aude sur IP</TITLE>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/xp/aw.css" rel="stylesheet"></link>
<style>
#myGrid .aw-alternate-even {background: #fff;}
#myGrid .aw-alternate-odd {background: #eee;}
#myGrid .aw-rows-selected {background: #316ac5;}
#myGrid .aw-grid-headers {color: blue}
#myGrid .aw-row-selector {width: 40px; text-align: left}
#myGrid .aw-row-1 {background: #FF0000}
</style>
<script>
var obj = new AW.Grid.Extended;
var button = new AW.UI.Button;
obj.setId("myGrid");
button.setId("button");
button.setControlText("clic me for color yellow");
obj.setControlSize(800, 250);
obj.setCellText(function(i, j){return j + "-" + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(10000);
// I set the color once :
obj.getRowTemplate(1).setStyle("background","red");
document.write(obj);
document.write(button);
button.onClick = function(text){
// when i set another time (from a button), it doesn't work!!!
obj.getRowTemplate(1).setStyle("background","yellow");
obj.refresh();
};
</script>
</body>
</html>
Pierre
November 21,