control-freak-ide/server/nodejs/tests/functional/Tree.html
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

72 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test dgrid/selector module</title>
<style>
@import "../../../../dojo/resources/dojo.css";
@import "../../../css/dgrid.css";
@import "../../../css/skins/claro.css";
.dgrid {
width: 700px;
margin: 10px;
}
#treeGrid .field-type {
width: 5em;
}
</style>
</head>
<body class="claro">
<div id="treeGrid"></div>
<script src="../../../../dojo/dojo.js" data-dojo-config="async: true"></script>
<script>
var treeGrid;
var ready;
require([
'dojo/_base/declare',
'dgrid/OnDemandGrid',
'dgrid/Tree',
'dgrid/test/data/createHierarchicalStore',
'dgrid/test/data/hierarchicalCountryData'
], function(declare, OnDemandGrid, Tree, createHierarchicalStore, hierarchicalCountryData){
var testCountryStore = createHierarchicalStore({ data: hierarchicalCountryData });
treeGrid = new (declare([OnDemandGrid, Tree]))({
sort: 'id',
collection: testCountryStore,
columns: [
{
renderExpando: true,
label: 'Name',
field: 'name',
sortable: false
},
{
label: 'Type',
field: 'type',
sortable: false
},
{
label: 'Population',
field: 'population'
},
{
label: 'Timezone',
field: 'timezone'
}
]
}, 'treeGrid');
ready = true;
});
</script>
</body>
</html>