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

Get object in Javascript


I am using Asp .Net MVC helper as follows


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

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

Kindly advise


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. 
Saranya D 

Live Chat Icon For mobile
Up arrow icon