- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="utf-8">
- <title>ZingGrid Demo</title>
- <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
- <style>
- html,
- body {
- height: 100%;
- width: 100%;
- margin: 0;
- padding: 0;
- }
-
- zing-grid[loading] {
- height: 142px;
- }
- </style>
- </head>
-
- <body>
-
- <zing-grid caption="XML Data Source">
- <zg-data>
- <zg-param name="recordPath" value="data.person"></zg-param>
- <zg-param name="responseType" value="text/xml"></zg-param>
- </zg-data>
- </zing-grid>
-
- <script>
- ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
- let gridData = `<data>
- <person>
- <first><![CDATA[Maria]]></first>
- <last><![CDATA[John]]></last>
- <number><![CDATA[123]]></number>
- </person>
- <person>
- <first><![CDATA[David]]></first>
- <last><![CDATA[Smith]]></last>
- <number><![CDATA[456]]></number>
- </person>
- <person>
- <first><![CDATA[Felicity]]></first>
- <last><![CDATA[Snow]]></last>
- <number><![CDATA[789]]></number>
- </person>
- </data>`;
-
- window.addEventListener('load', () => {
- let zgRef = document.querySelector('zing-grid');
- zgRef.executeOnLoad(() => {
- zgRef.data = gridData;
- });
- });
- </script>
- </body>
-
- </html>
- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="utf-8">
- <title>ZingGrid Demo</title>
- <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
- </head>
-
- <body>
-
- <zing-grid caption="XML Data Source">
- <zg-data>
- <zg-param name="recordPath" value="data.person"></zg-param>
- <zg-param name="responseType" value="text/xml"></zg-param>
- </zg-data>
- </zing-grid>
-
- </body>
-
- </html>
- html,
- body {
- height: 100%;
- width: 100%;
- margin: 0;
- padding: 0;
- }
- let gridData = `<data>
- <person>
- <first><![CDATA[Maria]]></first>
- <last><![CDATA[John]]></last>
- <number><![CDATA[123]]></number>
- </person>
- <person>
- <first><![CDATA[David]]></first>
- <last><![CDATA[Smith]]></last>
- <number><![CDATA[456]]></number>
- </person>
- <person>
- <first><![CDATA[Felicity]]></first>
- <last><![CDATA[Snow]]></last>
- <number><![CDATA[789]]></number>
- </person>
- </data>`;
-
- window.addEventListener('load', () => {
- let zgRef = document.querySelector('zing-grid');
- zgRef.executeOnLoad(() => {
- zgRef.data = gridData;
- });
- });