Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
	"http://www.w3.org/TR/html4/loose.dtd">
3
<html>
4
	<head>
5
		<title>Test dojox.Grid Programmatic Instantiation</title>
6
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
7
		<style type="text/css">
8
			@import "../../../dojo/resources/dojo.css";
9
			@import "../_grid/tundraGrid.css";
10
			.heading {
11
				font-weight: bold;
12
				padding-bottom: 0.25em;
13
			}
14
 
15
			#grid {
16
				border: 1px solid #333;
17
				width: 50em;
18
				height: 30em;
19
			}
20
		</style>
21
		<script type="text/javascript" src="../../../dojo/dojo.js"
22
			djConfig="isDebug:false, debugAtAllCosts: false, parseOnLoad: true"></script>
23
		<script type="text/javascript">
24
			dojo.require("dojox.grid.Grid");
25
			dojo.require("dojox.grid._data.model");
26
			dojo.require("dojo.parser");
27
		</script>
28
		<script type="text/javascript" src="support/test_data.js"></script>
29
		<script type="text/javascript">
30
			dojo.addOnLoad(function(){
31
				// a grid view is a group of columns
32
				var view1 = {
33
					cells: [
34
						[
35
							{name: 'Column 0'},
36
							{name: 'Column 1'},
37
							{name: 'Column 2'},
38
							{name: 'Column 3', width: "150px"},
39
							{name: 'Column 4'}
40
						],
41
						[
42
							{name: 'Column 5'},
43
							{name: 'Column 6'},
44
							{name: 'Column 7'},
45
							{name: 'Column 8', field: 3, colSpan: 2}
46
						]
47
					]
48
				};
49
				// a grid layout is an array of views.
50
				var layout = [ view1 ];
51
 
52
				var grid = new dojox.Grid({
53
					"id": "grid",
54
					"model": model,
55
					"structure": layout
56
				});
57
				dojo.byId("gridContainer").appendChild(grid.domNode);
58
				grid.render();
59
			});
60
		</script>
61
	</head>
62
	<body class="tundra">
63
		<div class="heading">dojox.Grid Programmatic Instantiation Test</div>
64
		<div id="gridContainer"></div>
65
	</body>
66
</html>