As customers requested, a full ASP .NET MVC based single page application (SPA) example showing how you can load task data in GanttChartView control from, and later submit data changes back to a SQL Server® database using Entity Framework, Razor syntax, and REST services provided by ASP .NET MVC API is now available for download from DlhSoft: Gantt Chart Single Page Database sample.
The relevant source code is commented whenever appropriate, but if you need some hints to get started browsing it, look first to these files:
- App_Data / Database.mdf
- Home / Index.cshtml
- Scripts / app:
Note that at this time task dependency support is not included within this sample, as it was developed to serve as a simple start point for your own applications. You can surely add predecessor item support yourself, by defining a new PredecessorItems database table, extending ProjectController to include that information in its GetProject method output, adding some client side code in ganttcharts.js to designate the task links based on the data received from the server, and eventually pass changed predecessors back upon saving. (You can find detailed information regarding the client side component here.)