1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
| <!DOCTYPE html>
| <html>
| <head>
| <meta charset="utf-8">
| <title>Test height:auto</title>
| <meta name="viewport" content="width=570">
| <style>
| @import "../../dojo/resources/dojo.css";
| @import "../css/dgrid.css";
| @import "../css/skins/claro.css";
| .heading {
| font-weight: bold;
| padding-bottom: 0.25em;
| }
| #grid {
| width: 400px;
| }
| </style>
| <script src="../../dojo/dojo.js"
| data-dojo-config="async: true"></script>
| <script>
| require([
| "dgrid/List",
| "dgrid/OnDemandGrid",
| "dgrid/Selection",
| "dgrid/Keyboard",
| "dojo/_base/declare",
| "dgrid/test/data/createAsyncStore",
| "dgrid/test/data/smallColorData",
| "dojo/domReady!"
| ], function(List, Grid, Selection, Keyboard, declare, createAsyncStore, smallColorData){
| window.grid = new (declare([Grid, Selection, Keyboard]))({
| className: "dgrid-autoheight",
| collection: createAsyncStore({ data: smallColorData }),
| columns: {
| col1: "Color",
| col5: "R",
| col6: "G",
| col7: "B"
| }
| }, "grid");
| });
|
| </script>
| </head>
| <body class="claro">
| <h2>A basic grid with height:auto</h2>
| <div id="grid"></div>
| <a href="https://github.com/SitePen/dgrid">dgrid</a>
| </body>
| </html>
|
|