• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingGrid: Blank Grid</title>
      <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
      <style>
        body {
          background: #e6e6e6;
        }
    
        zing-grid[loading] {
          height: 576px;
        }
      </style>
    </head>
    
    <body>
      <!-- Most features can be toggled on the toplevel zing-grid tag -->
      <zing-grid context-menu caption="Dialogs" editor="modal" row-selector editor-controls>
        <!-- dataset -->
        <zg-data data='[
          	{ "breed": "Cane Corso", "name": "Ziva"},
          	{ "breed": "Pug", "name": "Doug"},
          	{ "breed": "Corgi", "name": "Jenny"},
          	{ "breed": "Pomeranian", "name": "Koda"},
          	{ "breed": "Great Dane", "name": "Zeus"},
          	{ "breed": "Frenchie", "name": "Bruce"},
          	{ "breed": "Cane Corso", "name": "Sofia"},
          	{ "breed": "Pomeranian", "name": "Snowball"}
          ]'></zg-data>
      </zing-grid>
    
      <script>
        ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']); // window:load event for Javascript to run after HTML
        // because this Javascript is injected into the document head
        window.addEventListener('load', () => {
          // Javascript code to execute after DOM content
    
          let zgRef = document.querySelector('zing-grid');
    
          // update  add record button confirm
          zgRef.customizeDialog('record-create', {
            confirm: 'I Dare you to do it!!!'
          });
          // first argument 'null' update all cancel buttons in ALL modals
          zgRef.customizeDialog(null, {
            cancel: "DON'T DO IT!!!"
          });
        });
      </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingGrid: Blank Grid</title>
      <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    </head>
    
    <body>
      <!-- Most features can be toggled on the toplevel zing-grid tag -->
      <zing-grid context-menu caption="Dialogs" editor="modal" row-selector editor-controls>
        <!-- dataset -->
        <zg-data data='[
          	{ "breed": "Cane Corso", "name": "Ziva"},
          	{ "breed": "Pug", "name": "Doug"},
          	{ "breed": "Corgi", "name": "Jenny"},
          	{ "breed": "Pomeranian", "name": "Koda"},
          	{ "breed": "Great Dane", "name": "Zeus"},
          	{ "breed": "Frenchie", "name": "Bruce"},
          	{ "breed": "Cane Corso", "name": "Sofia"},
          	{ "breed": "Pomeranian", "name": "Snowball"}
          ]'></zg-data>
      </zing-grid>
    
    </body>
    
    </html>
    body {
      background: #e6e6e6;
    }
    // window:load event for Javascript to run after HTML
    // because this Javascript is injected into the document head
    window.addEventListener('load', () => {
      // Javascript code to execute after DOM content
    
      let zgRef = document.querySelector('zing-grid');
    
      // update  add record button confirm
      zgRef.customizeDialog('record-create', {
        confirm: 'I Dare you to do it!!!'
      });
      // first argument 'null' update all cancel buttons in ALL modals
      zgRef.customizeDialog(null, {
        cancel: "DON'T DO IT!!!"
      });
    });