• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid Demo</title>
    7. <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. <style>
    9. html,
    10. body {
    11. height: 100%;
    12. width: 100%;
    13. margin: 0;
    14. padding: 0;
    15. }
    16.  
    17. zing-grid[loading] {
    18. height: 317px;
    19. }
    20. </style>
    21. </head>
    22.  
    23. <body>
    24. <h3>`[filterIndex]` sets the data index to filter on if index has multiple fields.</h3>
    25. <zing-grid id="htmlGrid" caption="filterIndex demo" filter="both">
    26. <zg-colgroup>
    27. <zg-column index="first, last" filter-index="last">
    28. [[index.first]] - [[index.last]]
    29. </zg-column>
    30. <zg-column index="last"></zg-column>
    31. <zg-column index="number"></zg-column>
    32. </zg-colgroup>
    33. <zg-data data='[
    34. { "first": "Maria", "last": "John", "number": 123 },
    35. { "first": "David", "last": "Smith", "number": 456 },
    36. { "first": "Felicity", "last": "Snow", "number": 789 }
    37. ]'></zg-data>
    38. </zing-grid>
    39. <script>
    40. ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']);
    41. </script>
    42. </body>
    43.  
    44. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid Demo</title>
    7. <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <h3>`[filterIndex]` sets the data index to filter on if index has multiple fields.</h3>
    12. <zing-grid id="htmlGrid" caption="filterIndex demo" filter="both">
    13. <zg-colgroup>
    14. <zg-column index="first, last" filter-index="last">
    15. [[index.first]] - [[index.last]]
    16. </zg-column>
    17. <zg-column index="last"></zg-column>
    18. <zg-column index="number"></zg-column>
    19. </zg-colgroup>
    20. <zg-data data='[
    21. { "first": "Maria", "last": "John", "number": 123 },
    22. { "first": "David", "last": "Smith", "number": 456 },
    23. { "first": "Felicity", "last": "Snow", "number": 789 }
    24. ]'></zg-data>
    25. </zing-grid>
    26. </body>
    27.  
    28. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    1.