Debian Codegraph @

dojox/grid/tests/test_data_grid_autowidth.html

raw symbols SCIP
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.DataGrid Automatic Width</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 "../resources/Grid.css";
10 @import "../resources/tundraGrid.css";
11 body {
12 font-size: 0.9em;
13 font-family: Geneva, Arial, Helvetica, sans-serif;
14 }
15 .heading {
16 font-weight: bold;
17 padding-bottom: 0.25em;
18 }
19 .grid {
20 width: 85%;
21 height: 20em;
22 padding: 1px;
23 }
24 </style>
25 <script type="text/javascript" src="../../../dojo/dojo.js"
26 data-dojo-config="isDebug:false, parseOnLoad: true"></script>
27 <script type="text/javascript">
28 dojo.require("dijit.dijit");
29 dojo.require("dojox.grid.DataGrid");
30 dojo.require("dojo.data.ItemFileWriteStore");
31 dojo.require("dojo.parser");
32
33 dojo.addOnLoad(function(){
34 // A quick-and-dirty resize of the grid when the window resizes to
35 // test that percentages "stick" when they are supposed to.
36 dojo.connect(window, "resize", grid2, "resize");
37 });
38 </script>
39 <script type="text/javascript" src="support/test_data.js"></script>
40 </head>
41 <body class="tundra">
42 <div class="heading">dojox.grid.DataGrid Automatic Width Test</div>
43 <span dojoType="dojo.data.ItemFileWriteStore"
44 data-dojo-id="jsonStore" url="../../../dijit/tests/_data/countries.json">
45 </span>
46 <table dojoType="dojox.grid.DataGrid"
47 data-dojo-id="grid" id="grid" class="grid" autoWidth="true"
48 store="jsonStore" query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
49 <thead>
50 <tr>
51 <th field="name" width="30em">Country/Continent Name</th>
52 <th field="type" width="10em">Type</th>
53 <th field="population" width="10em">Population</th>
54 </tr>
55 </thead>
56 </table>
57 <div class="heading">Auto Width with % column widths (and fixed initial grid width)</div>
58 <table dojoType="dojox.grid.DataGrid"
59 data-dojo-id="grid1" id="grid1" class="grid" autoWidth="true" initialWidth="50em"
60 store="jsonStore" query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
61 <thead>
62 <tr>
63 <th field="name" width="50%">Country/Continent Name</th>
64 <th field="type" width="25%">Type</th>
65 <th field="population" width="25%">Population</th>
66 </tr>
67 </thead>
68 </table>
69 <div class="heading">Auto Width with % column widths (and % initial grid width)</div>
70 <table dojoType="dojox.grid.DataGrid"
71 data-dojo-id="grid2" id="grid2" class="grid" autoWidth="true" initialWidth="85%"
72 store="jsonStore" query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
73 <thead>
74 <tr>
75 <th field="name" width="50%">Country/Continent Name</th>
76 <th field="type" width="25%">Type</th>
77 <th field="population" width="25%">Population</th>
78 </tr>
79 </thead>
80 </table>
81 </body>
82 </html>
83