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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to connect and update changes from Gantt using Entity Framework

Platform: ASP.NET Web Forms |
Control: Gantt

In Gantt, we can load data from SQL database using ADO.NET Entity Data Model and can update the changes to the SQL database on CRUD operations.

Please refer following link to create the ADO.NET Entity Data Model in Visual studio,

Link: https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/models-data/creating-model-classes-with-the-entity-framework-cs

SQL database connection in Gantt can be established by using data model entity class. The Data Model entity class name is used as the connectionString name to establish the connection with the SQL database. The ‘connectionStrings’ will be automatically create in our web.config file once entity data model get generated.

Please refer following code snippet for adding SQL connection in web.config


CRUD actions are performed by entity classes to update Gantt data using the client side event ActionComplete and with PageMethods. 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.

Web Page Code[ASPX]:




Code Behind[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


A simple sample to add, edit, delete and update the Gantt data using ADO.NET Entity Data Model. Please find the sample from the following location.


2X faster development

The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
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.

Up arrow icon

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

Live Chat Icon For mobile