dojox
Version:
Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.
84 lines (80 loc) • 2.56 kB
HTML
<html>
<head>
<title>Test dojox.grid.DataGrid Autoheight test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<style type="text/css">
@import "../../../dojo/resources/dojo.css";
@import "../resources/Grid.css";
@import "../resources/tundraGrid.css";
.heading {
font-weight: bold;
padding-bottom: 0.25em;
margin-top: 1em;
}
.grid {
width: 65em;
height: 25em;
padding: 1px;
}
</style>
<script type="text/javascript" src="../../../dojo/dojo.js"
data-dojo-config="isDebug:true, parseOnLoad: true"></script>
<script type="text/javascript">
dojo.require("dijit.dijit");
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("dojo.parser");
</script>
<script type="text/javascript" src="support/test_data.js"></script>
</head>
<body class="tundra">
<span dojoType="dojo.data.ItemFileWriteStore"
data-dojo-id="jsonStore" url="../../../dijit/tests/_data/countries.json">
</span>
<div class="heading">No autoHeight (takes height of the div)</div>
<table dojoType="dojox.grid.DataGrid"
class="grid" store="jsonStore"
query="{ name: '*' }" rowsPerPage="20" rowSelector="20px">
<thead>
<tr>
<th field="name" width="300px">Country/Continent Name</th>
<th field="type" width="auto">Type</th>
</tr>
</thead>
</table>
<div class="heading">autoHeight=true</div>
<table dojoType="dojox.grid.DataGrid"
class="grid" store="jsonStore" autoHeight="true"
query="{ type: 'city' }" rowsPerPage="20" rowSelector="20px">
<thead>
<tr>
<th field="name" width="300px">Country/Continent Name</th>
<th field="type" width="auto">Type</th>
</tr>
</thead>
</table>
<div class="heading">autoHeight=5 (7 elements)</div>
<table dojoType="dojox.grid.DataGrid"
class="grid" store="jsonStore" autoHeight="5"
query="{ type: 'city' }" rowsPerPage="20" rowSelector="20px">
<thead>
<tr>
<th field="name" width="300px">Country/Continent Name</th>
<th field="type" width="auto">Type</th>
</tr>
</thead>
</table>
<div class="heading">autoHeight=10 (7 elements)</div>
<table dojoType="dojox.grid.DataGrid"
class="grid" store="jsonStore" autoHeight="10"
query="{ type: 'city' }" rowsPerPage="20" rowSelector="20px">
<thead>
<tr>
<th field="name" width="300px">Country/Continent Name</th>
<th field="type" width="auto">Type</th>
</tr>
</thead>
</table>
</body>
</html>