• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Blank Grid</title>
    7. <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. <style>
    9. body {
    10. background: #e6e6e6;
    11. }
    12.  
    13. zing-grid[loading] {
    14. height: 178px;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20.  
    21. <zing-grid data='[
    22. {
    23. "name": "Philip",
    24. "number": 123,
    25. "colors": {
    26. "primary": "red",
    27. "secondary": "chartreuse"
    28. }
    29. },
    30. {
    31. "name": "Bender",
    32. "number": 456,
    33. "colors": {
    34. "primary": "black",
    35. "secondary": "yellow"
    36. }
    37. }
    38. ]'>
    39. <zg-column index="colors.primary" header="colors.primary"></zg-column>
    40. <zg-column index="colors.secondary" header="colors.secondary"></zg-column>
    41. </zing-grid>
    42.  
    43. <script>
    44. ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']); // window:load event for Javascript to run after HTML
    45. // because this Javascript is injected into the document head
    46. window.addEventListener('load', () => {
    47. // Javascript code to execute after DOM content
    48. });
    49. </script>
    50. </body>
    51.  
    52. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Blank Grid</title>
    7. <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11.  
    12. <zing-grid data='[
    13. {
    14. "name": "Philip",
    15. "number": 123,
    16. "colors": {
    17. "primary": "red",
    18. "secondary": "chartreuse"
    19. }
    20. },
    21. {
    22. "name": "Bender",
    23. "number": 456,
    24. "colors": {
    25. "primary": "black",
    26. "secondary": "yellow"
    27. }
    28. }
    29. ]'>
    30. <zg-column index="colors.primary" header="colors.primary"></zg-column>
    31. <zg-column index="colors.secondary" header="colors.secondary"></zg-column>
    32. </zing-grid>
    33.  
    34. </body>
    35.  
    36. </html>
    1. body {
    2. background: #e6e6e6;
    3. }
    1. // window:load event for Javascript to run after HTML
    2. // because this Javascript is injected into the document head
    3. window.addEventListener('load', () => {
    4. // Javascript code to execute after DOM content
    5. });