• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingGrid: Docs Getting Started</title>
      <!--Script Reference[1]-->
      <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: 277px;
        }
      </style>
    </head>
    
    <body>
      <!--Grid Component Placement[2]-->
      <zing-grid caption="Register Custom Editor template" editor="modal">
        <zg-data data='[{
              "num": "3",
              "feet": "6",
              "inch": "0",
              "first": "Roberto",
              "last": "Aguayo",
              "col": "Florida State"
          }, {
              "num": "83",
              "feet": "6",
              "inch": "4",
              "first": "Braedon",
              "last": "Bowman",
              "col": "South Alabama"
          }, {
              "num": "67",
              "feet": "6",
              "inch": "6",
              "first": "Brett",
              "last": "Boyko",
              "col": "Nevada-Las Vegas"
          } ]'></zg-data>
        <zg-colgroup>
          <zg-column index="num" header="#"></zg-column>
          <zg-column index="first, last" header="Player" editor-template="editFullName"></zg-column>
          <zg-column index="col" header="College"></zg-column>
          <zg-column index="feet, inch" header="Height" editor-template="editHeight">
            [[index.feet]]" [[index.inch]]'
          </zg-column>
        </zg-colgroup>
      </zing-grid>
    
      <template id="editFullName">
        First Name: <input type="text" value="[[index.first]]"><br><br>
        Last Name: <input type="text" value="[[index.last]]"><br>
      </template>
    
      <template id="editHeight">
        Feet: <input type="text" value="[[index.feet]]"><br><br>
        Inches: <input type="text" value="[[index.inch]]"><br>
      </template>
      <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
        });
      </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingGrid: Docs Getting Started</title>
      <!--Script Reference[1]-->
      <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    </head>
    
    <body>
      <!--Grid Component Placement[2]-->
      <zing-grid caption="Register Custom Editor template" editor="modal">
        <zg-data data='[{
              "num": "3",
              "feet": "6",
              "inch": "0",
              "first": "Roberto",
              "last": "Aguayo",
              "col": "Florida State"
          }, {
              "num": "83",
              "feet": "6",
              "inch": "4",
              "first": "Braedon",
              "last": "Bowman",
              "col": "South Alabama"
          }, {
              "num": "67",
              "feet": "6",
              "inch": "6",
              "first": "Brett",
              "last": "Boyko",
              "col": "Nevada-Las Vegas"
          } ]'></zg-data>
        <zg-colgroup>
          <zg-column index="num" header="#"></zg-column>
          <zg-column index="first, last" header="Player" editor-template="editFullName"></zg-column>
          <zg-column index="col" header="College"></zg-column>
          <zg-column index="feet, inch" header="Height" editor-template="editHeight">
            [[index.feet]]" [[index.inch]]'
          </zg-column>
        </zg-colgroup>
      </zing-grid>
    
      <template id="editFullName">
        First Name: <input type="text" value="[[index.first]]"><br><br>
        Last Name: <input type="text" value="[[index.last]]"><br>
      </template>
    
      <template id="editHeight">
        Feet: <input type="text" value="[[index.feet]]"><br><br>
        Inches: <input type="text" value="[[index.inch]]"><br>
      </template>
    </body>
    
    </html>
    html,
    body {
      height: 100%;
      width: 100%;
      margin: 0;
      padding: 0;
    }
    // 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
    });