connect ganttchart developed in mvc to sql server

hi there,
can anyone tell me how to connect ganttchart developed in mvc to sql server.
need assistance immediately please.

please check this post … p-net-mvc/

anyone know how to make it using database first approach!!!

You can find declaration of a data model in “Step 2 – Creating Task and Link Models”.
If you use Database First approach, you can create an appropriate tables for that model and generate classes for it, or set the mapping of a given model to your tables if you already have them.
Can you elaborate your question? did you encounter some difficulty?

Hi ,

In Step 2 - I added an entity model (DB first) but when i run the app, data comes in JSON format and not in chart format


there are a couple of working demos for ASP.NET on github✓&q=gantt-howto-dotnet&type=&language= - can you please check those?

If nothing helps - please show the json format you’re getting, probably it can be converted to the gantt chart format

Thanks for your response. I’ve fixed that.
But I’ve another issue now. The Gantt Chart runs fine on my local machine but when I deploy it on server - the chart doesnt show up. The console shows error in loading data(see below)

ajax.js:208 GET http://domain/Home/Data?dhxr1554417616249=1 404 (Not Found)

Would appreciate your help on this. I’ve followed this tutorial in building Gantt( except the Step 2 in which I load data from SQL server DB)

Just to add, the data is loading on Server from DB when directly call Data Action method(by changing the route config and adding a View on Data Action method).
But when I try to load data from main.js by gantt.load("/Home/Data","json") it gives the failed to load resource error(mentioned in my previous comment).

I tried one more thing. Kept the datasource inline and did this gantt.parse(jsonobjectname)
it worked on local as well as on server.

But loading from JSON file or SQL Server DB doesnt work. There seems to be an issue with gantt.load() .

Also the data from DB is in the format expected by DHTMLX.Gantt.

Hello Shaz,
Please, do not create duplicate messages in different topics. As this optic has more information about your case, let’s discuss your case here.

I do not specialize in ASP.NET. Please, send me your sample where the issue can be reproduced, and I will give that to the dev team.