Hi Rodrigo,
Thanks for contacting Syncfusion support.
Query: “Can't get TreeGrid to work”
From your query, we understand that you are facing issue while copying and pasting the code example from stackblitz. In stackblitz, JavaScript file (index.js) will be automatically referred in the index.html file. But while running the sample locally, JavaScript file (index.js) must be referred in the index.html page to render the controls (TreeGrid) properly. So we suspect that (index.js) is not referred in the index.html file hence the reported issue occur.
So to overcome the reported issue, we suggest you to refer the index.js file in the index.html file. Refer the below code
<html>
<head>
<script src="https://ej2.syncfusion.com/javascript/demos/tree-grid/stacked-header/datasource.js" type="text/javascript"></script>
<script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js" type="text/javascript"></script>
<link rel='nofollow' href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet">
<style>
body{
touch - action: none;
}
</style>
</head>
<body>
<div class="stackblitz-container material">
<div class="control-section">
<div class="content-wrapper">
<div id="TreeGrid"></div>
</div>
</div>
<script src="index.js" type="text/javascript"></script>
</div>
</body>
</html> |
Please get back to us if you have further queries.
Regards,
Vignesh Natarajan.