<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZingGrid: Simple Grid</title>
<script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
<style>
body {
background: #e6e6e6;
}
zing-grid[loading] {
height: 213px;
}
</style>
</head>
<body>
<zing-grid data='[
{ "first": "Maria", "last": "John", "tests": [{"test1": 0.92, "test2": 0.97 ,"test3": 0.84}] },
{ "first": "David", "last": "Smith", "tests": [{"test1": 0.86, "test2": 0.79, "test3": 0.86}] },
{ "first": "Felicity", "last": "Snow", "tests": [{"test1": 0.84, "test2": 0.66, "test3": 0.76}] }
]'>
<zg-colgroup>
<zg-column index="first"></zg-column>
<zg-column index="last"></zg-column>
</zg-colgroup>
</zing-grid>
<template id="rowDetailsTemplate">
<zing-grid data='[[record.tests]]'>
<zg-colgroup>
<zg-column index="test1"></zg-column>
<zg-column index="test2"></zg-column>
<zg-column index="test3"></zg-column>
</zg-colgroup>
</zing-grid>
</template>
<script>
ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
const zgRef = document.querySelector('zing-grid');
// Enable row details
zgRef.setRowDetailsTemplate('rowDetailsTemplate');
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZingGrid: Simple Grid</title>
<script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
</head>
<body>
<zing-grid data='[
{ "first": "Maria", "last": "John", "tests": [{"test1": 0.92, "test2": 0.97 ,"test3": 0.84}] },
{ "first": "David", "last": "Smith", "tests": [{"test1": 0.86, "test2": 0.79, "test3": 0.86}] },
{ "first": "Felicity", "last": "Snow", "tests": [{"test1": 0.84, "test2": 0.66, "test3": 0.76}] }
]'>
<zg-colgroup>
<zg-column index="first"></zg-column>
<zg-column index="last"></zg-column>
</zg-colgroup>
</zing-grid>
<template id="rowDetailsTemplate">
<zing-grid data='[[record.tests]]'>
<zg-colgroup>
<zg-column index="test1"></zg-column>
<zg-column index="test2"></zg-column>
<zg-column index="test3"></zg-column>
</zg-colgroup>
</zing-grid>
</template>
</body>
</html>
body {
background: #e6e6e6;
}
const zgRef = document.querySelector('zing-grid');
// Enable row details
zgRef.setRowDetailsTemplate('rowDetailsTemplate');