bug ?
Setting the font-size in % does not preserve column width above 100%
grid.getCellTemplate().setStyle("font-size:130%;color:blue;");
<style>
#myGrid .aw-column-0 {width: 3em; text-align: center}
#myGrid .aw-column-1 {width: 10em;}
#myGrid .aw-column-2 {width: 6em; text-align: right}
#myGrid .aw-column-3 {width: 6em; text-align: center}
#myGrid .aw-grid-row {height:1em;line-height:1.1em}
#myGrid .aw-header-0 {height:1em;line-height:1em}
</style>
<script>
var myData = [
[1, "World", 1018057389, 2005, "world"],
[2, "European Union", 247000000, 2006, "eu"],
[3, "United States", 205326680, 2005, "us"],
[4, "China", 123000000, 2006, "cn"],
[5, "Japan", 86300000, 2005, "jp"],
[6, "India", 60000000, 2005, "in"],
[7, "Germany", 50616000, 2006, "de"],
[8, "United Kingdom", 37600000, 2005, "gb"],
[9, "Korea South", 33900000, 2005, "kr"],
[10, "France", 29945000, 2006, "fr"] // no comma in the last line
];
var myHeaders = ["Rank", "Country", "Internet users", "Data from"];
</script>
<!-- create controls -->
<script>
var num = new AW.Formats.Number;
num.setTextFormat("#,###.");
var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setHeaderText(myHeaders);
grid.setCellData(myData);
grid.setCellFormat(num, 2);
grid.setColumnCount(4);
grid.setRowCount(10);
grid.getCellTemplate().setStyle("font-size:130%;color:blue;");
grid.refresh();
</script>
grid.getCellTemplate().setStyle("font-size:130%;color:blue;");
<style>
#myGrid .aw-column-0 {width: 3em; text-align: center}
#myGrid .aw-column-1 {width: 10em;}
#myGrid .aw-column-2 {width: 6em; text-align: right}
#myGrid .aw-column-3 {width: 6em; text-align: center}
#myGrid .aw-grid-row {height:1em;line-height:1.1em}
#myGrid .aw-header-0 {height:1em;line-height:1em}
</style>
<script>
var myData = [
[1, "World", 1018057389, 2005, "world"],
[2, "European Union", 247000000, 2006, "eu"],
[3, "United States", 205326680, 2005, "us"],
[4, "China", 123000000, 2006, "cn"],
[5, "Japan", 86300000, 2005, "jp"],
[6, "India", 60000000, 2005, "in"],
[7, "Germany", 50616000, 2006, "de"],
[8, "United Kingdom", 37600000, 2005, "gb"],
[9, "Korea South", 33900000, 2005, "kr"],
[10, "France", 29945000, 2006, "fr"] // no comma in the last line
];
var myHeaders = ["Rank", "Country", "Internet users", "Data from"];
</script>
<!-- create controls -->
<script>
var num = new AW.Formats.Number;
num.setTextFormat("#,###.");
var grid = new AW.UI.Grid;
grid.setId("myGrid");
grid.setHeaderText(myHeaders);
grid.setCellData(myData);
grid.setCellFormat(num, 2);
grid.setColumnCount(4);
grid.setRowCount(10);
grid.getCellTemplate().setStyle("font-size:130%;color:blue;");
grid.refresh();
</script>
Philippe Marzin
December 17,