<html>
<head>
<link rel="stylesheet" type="text/css" href="./runtime/styles/xp/aw.css"></link>
<script src="./runtime/lib/aw.js"></script>
</head>
<body>
<script>
function toggle()
{
obj.clearRowModel()
if ( vistype == "collapse" )
{
obj.setRowCount(21)
obj.setControlSize(400,406)
obj.setCellData(myCells2)
vistype = "expand"
var columns = [ "<a onclick=toggle()><img src=collapse.gif></a> Number" ]
}
else
{
obj.setRowCount(10)
obj.setControlSize(400,208)
obj.setCellData(myCells1)
vistype = "collapse"
var columns = ["<a onclick=toggle()><img src=expand.gif></a> Number"]
}
obj.setHeaderText(columns)
}
var myCells1=[[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11]]
var myCells2=[[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12],[13],[14],[15],[16],[17],[18],[19],[20],[21]]
var obj=new AW.UI.Grid
var vistype="expand"
toggle()
obj.setColumnCount(1)
obj.setVirtualMode(false)
document.write(obj)
</script>
</body>
</html>
...
obj.setCellData(myCells2)
obj.setScrollBars("none")
vistype = "expand"
...
This topic is archived.