<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<base href="http://cbb/">
<title>Search Results List</title>
<link href="Grid/styles/xp/grid.css" rel="stylesheet" type="text/css">
<style>
body {
overflow: hidden;
}
.active-controls-grid {
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: expression(this.parentNode.offsetWidth-3);
font: menu;
}
</style>
<script src="grid/lib/grid.js"></script>
<!--script src="http://www.activewidgets.com/runtime/lib/grid.js"></script-->
<script>
var myData = [ ["dbID", "pgID", "Gender", "Age", "Height (cm)", "Weight (Kg)", "Status"],
["0", "Test 0", "FEMALE", "0", "70", "100", "PRE-SCREENED"],
["1", "Test 1", "MALE", "1", "72", "101", "SCREENED"],
["2", "Test 2", "MALE", "2", "73", "102", "SCREENED"],
["3", "Test 3", "FEMALE", "3", "74", "103", "PRE-SCREENED"],
["4", "Test 4", "FEMALE", "4", "75", "104", "SCREENED"],
["5", "Test 5", "MALE", "5", "76", "105", "SCREENED"],
["6", "Test 6", "MALE", "6", "77", "106", "PRE-SCREENED"],
["7", "Test 7", "MALE", "7", "78", "107", "SCREENED"],
["8", "Test 8", "FEMALE", "8", "78", "108", "SCREENED"],
["9", "Test 9", "MALE", "9", "80", "109", "PRE-SCREENED"],
["10", "Test 10", "MALE", "37", "78", "77", "SCREENED"] ];
</script>
</head>
<body>
<div id="box" style="height:100%;width:100%;">
</div>
<script>
var results = new Active.Controls.Grid;
results.setColumnProperty("count", myData[0].length-2);
results.setColumnProperty("text", function(j){return myData[0][j+2];});
results.setColumnHeaderHeight("20px");
results.setRowProperty("count", myData.length-1);
results.setRowProperty("text", function(i){return myData[i+1][1];});
results.setRowHeaderWidth("200px");
results.setDataProperty("text", function(i,j){return myData[i+1][j+2];});
results.setAction("click", function(src){alert(src._id);alert(src.getItemProperty("text"))});
document.getElementById("box").innerHTML = results;
</script>
</body>
</html>
This topic is archived.