Column Headers with Kebab Case Data
ZingGrid autoformats headers for you by capitalizing and spacing your kebab case data keys.
Result
Full
HTML
CSS
JS
Edit
Download
Full Code
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ZingGrid: Simple Grid</title> <script nonce="undefined" src="https://cdn.zinggrid.com/zinggrid.min.js"></script> <style> .zg-body { background: #e6e6e6; } zing-grid[loading] { height: 373px; } </style> </head> <body class="zg-body"> <zing-grid caption="EPL Top Scorers" layout="row" layout-controls="disabled" viewport-stop> <zg-data data='[ { "player-name": "Eden Hazard", "player-club": "Chelsea", "goals-scored": 5 }, { "player-name": "Aleksandar Mitrovic", "player-club": "Fulham", "goals-scored": 5 }, { "player-name": "Sergio Agüero", "player-club": "Manchester City", "goals-scored": 4 }, { "player-name": "Romelu Lukaku", "player-club": "Manchester United", "goals-scored": 4 }, { "player-name": "Sadio Mané", "player-club": "Liverpool", "goals-scored": 4 } ]'></zg-data> </zing-grid> <script> ZingGrid.setLicense(['26ccbfec16b8be9ee98c7d57bee6e498']); </script> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>ZingGrid: Simple Grid</title> <script src="https://cdn.zinggrid.com/zinggrid.min.js"></script> </head> <body class="zg-body"> <zing-grid caption="EPL Top Scorers" layout="row" layout-controls="disabled" viewport-stop> <zg-data data='[ { "player-name": "Eden Hazard", "player-club": "Chelsea", "goals-scored": 5 }, { "player-name": "Aleksandar Mitrovic", "player-club": "Fulham", "goals-scored": 5 }, { "player-name": "Sergio Agüero", "player-club": "Manchester City", "goals-scored": 4 }, { "player-name": "Romelu Lukaku", "player-club": "Manchester United", "goals-scored": 4 }, { "player-name": "Sadio Mané", "player-club": "Liverpool", "goals-scored": 4 } ]'></zg-data> </zing-grid> </body> </html>
.zg-body {background:#e6e6e6;}
// No JS code
Interested in this demo? Modify it to your needs in ZingSoft Studio, our testing sandbox. It's free to sign up, and you can come back and edit at any time!