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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to connect and update changes from Gantt to SQL database

Platform: ASP.NET MVC |
Control: Gantt |
Published Date: November 5, 2015 |
Last Revised Date: September 8, 2017

In Gantt, we can load data from SQL database and can update the changes to the SQL database. SQL database connection in Gantt can be established by using `connectionStrings` tag in the web.config file. Please refer following code snippet for adding SQL connection in web.config


CRUD actions performed in Gantt data can be updated to SQL database using the client side event ActionComplete and with AJAX post method. The event argument requestType of the ActionComplete client side event is used to identify the type of action performed in Gantt such as update, delete, add new task. Please refer the below code example for updating the changes to the SQL database.





Controller Code [C#]:


Creating Gantt object



Connecting SQL database and fetching records from database:


Add method to add new tasks to SQL database:




Update method to update the changes from Gantt to SQL database:



Delete method to delete the tasks from SQL database


Sample link:

A simple sample to establish SQL connection and add, edit, delete and update the data to the SQL database through Gantt is available in the following link.


You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon