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

Gantt chart SQL connection

I am trying to start the Gantt Chart control in conjunction with the SQL database. On the forum I found an example from 2017 but unfortunately it does not work properly - the task object is not added to the database and after manually added in the database there is a Javascript error in the browser. Is it possible to obtain the current example of combining this control (in version 17.1) with the database.

1 Reply

PP Pooja Priya Krishna Moorthy Syncfusion Team June 5, 2019 05:58 AM

Hi Adam, 
Greetings from Syncfusion support. 
We are prepared a Gantt sample and loaded tasks from SQL database and updated the database on CRUD action in source version 
Please find the code example below. 
<ej:Gantt ID="Gantt1" runat="server" 
<asp:ScriptManager ID="ScriptManager" runat="server" EnablePageMethods="True" /> 
<script type="text/javascript">             
            function ActionComplete(args) { 
                if (args.requestType == "save" && args.addedRecord) { 
                    var data = args.addedRecord.item; 
        public static void AddIt(TaskData record) 
            GanttSample sample = new GanttSample(); 
       public void Add(TaskData Task) 
            GanttData data = new GanttData 
                TaskId = Task.TaskId, 
Please, find the sample and KB link below. 
Please get back to us if you require further assistance on this. 
Pooja Priya K. 

Live Chat Icon For mobile
Up arrow icon