We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Can't get TreeGrid to work

Hi!

I can't get TreeGrid to work. I saw the demos, and this sample https://stackblitz.com/edit/xv88ni-xslyrc?file=index.js
but when I copy and paste on my server, I get a blank page.
I already checked the Debug console on Chrome and everything is loaded. I don't know more what to do.
If someone could give a help, I'll be thankfull.

Regards,
Rodrigo

1 Reply

VN Vignesh Natarajan Syncfusion Team May 2, 2019 10:06 AM UTC

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. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon