Get object in Javascript

Hi

I am using Asp .Net MVC helper as follows

    @(Html.EJS().Gantt("GanttContainer1").....

Now how to get the gantt object in client side in Javascript ?

  var ganttObj = $("#GanttContainer1").ejGantt("instance") is giving error.

Kindly advise

Thanks

1 Reply

SD Saranya Dhayalan Syncfusion Team October 18, 2019 06:40 AM UTC

Hi Abhishek, 
Thank you for contacting Syncfusion support. 
We have checked your code snippet, we think that you are using pure JavaScript based Gantt (EJ2-Gantt). To take the instance of the Gantt control, please use the below code snippets. 
var ganttObj = document.getElementById('GanttContainer1').ej2_instances[0]; 
Kindly refer to the below documentation link to know more about EJ2 Gantt. 
Please get back to us if you require further assistance. 
Regards, 
Saranya D 


Loader.
Up arrow icon