• 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: 576px;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <!-- Most features can be toggled on the toplevel zing-grid tag -->
    21. <zing-grid context-menu caption="Dialogs" editor="modal" row-selector editor-controls>
    22. <!-- dataset -->
    23. <zg-data data='[
    24. { "breed": "Cane Corso", "name": "Ziva"},
    25. { "breed": "Pug", "name": "Doug"},
    26. { "breed": "Corgi", "name": "Jenny"},
    27. { "breed": "Pomeranian", "name": "Koda"},
    28. { "breed": "Great Dane", "name": "Zeus"},
    29. { "breed": "Frenchie", "name": "Bruce"},
    30. { "breed": "Cane Corso", "name": "Sofia"},
    31. { "breed": "Pomeranian", "name": "Snowball"}
    32. ]'></zg-data>
    33. </zing-grid>
    34.  
    35. <script>
    36. ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']); // window:load event for Javascript to run after HTML
    37. // because this Javascript is injected into the document head
    38. window.addEventListener('load', () => {
    39. // Javascript code to execute after DOM content
    40.  
    41. let zgRef = document.querySelector('zing-grid');
    42.  
    43. // update add record button confirm
    44. zgRef.customizeDialog('record-create', {
    45. confirm: 'I Dare you to do it!!!'
    46. });
    47. // first argument 'null' update all cancel buttons in ALL modals
    48. zgRef.customizeDialog(null, {
    49. cancel: "DON'T DO IT!!!"
    50. });
    51. });
    52. </script>
    53. </body>
    54.  
    55. </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. <!-- Most features can be toggled on the toplevel zing-grid tag -->
    12. <zing-grid context-menu caption="Dialogs" editor="modal" row-selector editor-controls>
    13. <!-- dataset -->
    14. <zg-data data='[
    15. { "breed": "Cane Corso", "name": "Ziva"},
    16. { "breed": "Pug", "name": "Doug"},
    17. { "breed": "Corgi", "name": "Jenny"},
    18. { "breed": "Pomeranian", "name": "Koda"},
    19. { "breed": "Great Dane", "name": "Zeus"},
    20. { "breed": "Frenchie", "name": "Bruce"},
    21. { "breed": "Cane Corso", "name": "Sofia"},
    22. { "breed": "Pomeranian", "name": "Snowball"}
    23. ]'></zg-data>
    24. </zing-grid>
    25.  
    26. </body>
    27.  
    28. </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.  
    6. let zgRef = document.querySelector('zing-grid');
    7.  
    8. // update add record button confirm
    9. zgRef.customizeDialog('record-create', {
    10. confirm: 'I Dare you to do it!!!'
    11. });
    12. // first argument 'null' update all cancel buttons in ALL modals
    13. zgRef.customizeDialog(null, {
    14. cancel: "DON'T DO IT!!!"
    15. });
    16. });