• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Simple 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. #result {
    14. background: #333232;
    15. color: white;
    16. font-family: monospace;
    17. margin-bottom: 2rem;
    18. padding: 1rem;
    19. }
    20.  
    21. zing-grid[loading] {
    22. height: 307px;
    23. }
    24. </style>
    25. </head>
    26.  
    27. <body>
    28. <zing-grid caption="ZingGrid Method - setBatchEdit()" editor-controls>
    29. <zg-data data='[
    30. {
    31. "name": "Maria",
    32. "number": 123
    33. },
    34. {
    35. "name": "Juanita",
    36. "number": 456
    37. },
    38. {
    39. "name": "Felicity",
    40. "number": 789
    41. }
    42. ]'>
    43. </zg-data>
    44. </zing-grid>
    45. <script>
    46. ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
    47. window.addEventListener('load', () => {
    48. const zgRef = document.querySelector('zing-grid');
    49. zgRef.executeOnLoad(() => {
    50. // Set to enable batch edit and add associated controls
    51. zgRef.setBatchEdit(true);
    52. });
    53. });
    54. </script>
    55. </body>
    56.  
    57. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Simple Grid</title>
    7. <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <zing-grid caption="ZingGrid Method - setBatchEdit()" editor-controls>
    12. <zg-data data='[
    13. {
    14. "name": "Maria",
    15. "number": 123
    16. },
    17. {
    18. "name": "Juanita",
    19. "number": 456
    20. },
    21. {
    22. "name": "Felicity",
    23. "number": 789
    24. }
    25. ]'>
    26. </zg-data>
    27. </zing-grid>
    28. </body>
    29.  
    30. </html>
    1. body {
    2. background: #e6e6e6;
    3. }
    4.  
    5. #result {
    6. background: #333232;
    7. color: white;
    8. font-family: monospace;
    9. margin-bottom: 2rem;
    10. padding: 1rem;
    11. }
    1. window.addEventListener('load', () => {
    2. const zgRef = document.querySelector('zing-grid');
    3. zgRef.executeOnLoad(() => {
    4. // Set to enable batch edit and add associated controls
    5. zgRef.setBatchEdit(true);
    6. });
    7. });