<html>
<body>
<table border="1">
<thead>
<tr>
<th rowspan="2">text</th>
<th colspan="2">text</th>
</tr>
<tr>
<th>text</th>
<th>text</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</tbody>
</table>
</body>
</html>
<html>
<head>
<title>ActiveWidgets Examples</title>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/system/aw.css" rel="stylesheet"></link>
</head>
<body>
<table id="test" style="display:none">
<thead>
<tr>
<th rowspan="2">text</th>
<th colspan="2">text</th>
</tr>
<tr>
<th>text</th>
<th>text</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</tbody>
</table>
<script>
var obj = new AW.UI.Grid;
var oTable = document.getElementById('test');
var RowsLength = oTable.rows.length;
var CellsLength = oTable.rows.item(1).cells.length;
obj.setCellText(function(i, j){return oTable.rows.item(j).cells.item(i).innerText});
//obj.setHeaderText(myHeader);
obj.setColumnCount(CellsLength);
obj.setRowCount(RowsLength);
obj.setVirtualMode(false);
obj.setCellEditable(false);
document.write(obj);
</script>
</body>
</html>
This topic is archived.