I need SQL database example and and editing control codes for using Gantt Chart on a project

Hello Syncfusion team, 

There are too many user guides and documentations about Gant Chart. But I can not create normal sample on SQL. 
I cannot define dependency between main and child task. There is too many versions, but I cant select how to define dependency tree. 
Is it possible to define TaskID and ParentID? 
Or we must use only Task and Child list? 
There are too many such kind of questions. That is why I need example of ASP.Core Gant solution and SQL query to file. 
 

5 Replies 1 reply marked as answer

GM Gopinath Muniraj Syncfusion Team December 18, 2020 11:51 AM UTC

Hi Kime, 
Thanks for contacting Syncfusion support. We have analyzed your queries. 
Please find the below response. 
S. No 
Queries 
Syncfusion comments 
Gantt database example 
We can also maintain the data in the server by using the URL adaptor. Please refer the below documentation link. 
All the CRUD operations in the gantt are done through DataManager. The DataManager has an option to bind all the CRUD related data in server-side. 
You can get the full sample from our github repository. Please get the sample from below link. 
 
I cannot define dependency between main and child task 
Are you mean dependency between the parent task and child task? If yes, currently we have support of mapping the task relationship for child tasks only and not for the parent tasks. We have logged a feature report for this. The status can be tracked through below feedback link. 
Currently, we are working on Gantt chart implementation in Blazor platform with high priority. So, we are unable to add additional features in Gantt chart component as promised. However, we will try to implement the required features in the calendar of 2021 based on highly voted feedbacks. We appreciate your patience until then. 
 
Is it possible to define TaskID and ParentID? Or we must use only Task and Child list? 
To use only task and its child list is not necessary. We can also use the TaskID and the ParentID. This is called self-reference data. Please refer the below online sample browser to get more information about the self-reference data. 
 
Please contact us if you have any other queries. 
Thanks, 
Gopinath M 



KN Kime Nene December 18, 2020 03:46 PM UTC

Dear Gopinath, 

Thanks for all wide information and guides. 
I will read all of links and try to use all recommendations. 
At the moment I am going to compare Devexpress Gantt and Syncfusion Gantt. At the moment Syncfusion Gantt functionalities are much more. But for implementing in a real projects to find samples too hard. May be for example in user guide you should show real SQL DB (or any remote database) connection samples? it will help to developers use your products much more.

I would like to know about some future plans of Syncfusion team: 
For example there is Devexpress Xpo product. It help to connect and manage database controls (updates of tables, columns and they configurations). Not only alternate of EF Core, but also with much more functionalities. Have you planning to develop such a product for the future?
 



GM Gopinath Muniraj Syncfusion Team December 21, 2020 12:51 PM UTC

Hi Kime, 
We have analyzed your query. 
We are having the support for maintain the data in the server. We can connect that remote data using the URL adaptor. Please refer the below documentation to know more about URL adaptor. 
We can also do CRUD operations over Gantt data and save the changes to database. By using BatchUrl property of DataManager, we can communicate with the controller method to update the data source on CRUD operation. 
We have prepared a sample for your reference. In this example, we are adding, editing or deleting the records in the server side using the batchURL support. Please get the sample from below link. 
And please refer this below link to create the ADO.Net Entity Model in visual studio. 
And we need some clarifications regarding your query. 
  1. What do you mean by the term – “I would like to know about some future plans of Syncfusion team:” – Do you want to know more about our upcoming planned features?
  2. And we the support for editing, adding and deleting the data in the database by communicating with the controller method.
Please let us know the details that you needed. It will be helpful for us to resolve your queries as soon as possible. 
Thanks, 
Gopinath M 



KN Kime Nene December 24, 2020 02:06 PM UTC

Dear Gopinath, 

Thanks for all information. I did all CRUD operations, SQL integrations. 
Now I cannot integrate resources field to GanttChart.  

My model class bellow:

namespace WebApp.Models.GanttModels
{

    public partial class GanttDataSourceTb
    {

        public GanttDataSourceTb()
        {
            ResourceAssignment = new HashSet<ResourceAssignment>();
        }

        [Key]
        public int TaskId { get; set; }
        public string TaskName { get; set; }
        public DateTime? StartDate { get; set; }
        public DateTime? EndDate { get; set; }
        public DateTime BaselineStartDate { get; set; }
        public DateTime BaselineEndDate { get; set; }
        public int? Duration { get; set; }
        public int? Progress { get; set; }
        public int? IsManual { get; set; }
        public int? Job { get; set; }
        public string Predecessor { get; set; }
        public string Notes { get; set; }
        public string TaskType { get; set; }
        public int? ParentID { get; set; }
        public int? ResourceId { get; set; }
        public int ProjectConn { get; set; }

        public ProjectsTb ProjectConnNavigation { get; set; }
        public ICollection<ResourceAssignment> ResourceAssignment { get; set; }

    }

    public partial class ResourceAssignment
    {
        [Key]
        public int AssignId { get; set; }
        public int TaskId { get; set; }
        public int ResourceId { get; set; }

        public Resources Resource { get; set; }
        public GanttDataSourceTb Task { get; set; }
    }

    public partial class Resources
    {

        public Resources()
        {
            ResourceAssignment = new HashSet<ResourceAssignment>();
        }

        [Key]
        public int ResourceId { get; set; }
        public string ResourceName { get; set; }
        public string Unit { get; set; }

        public ICollection<ResourceAssignment> ResourceAssignment { get; set; }

    }

    public partial class ProjectsTb
    {
        public ProjectsTb()
        {
            GanttDataSourceTb = new HashSet<GanttDataSourceTb>();
        }

        [Key]
        public int? ProjectId { get; set; }
        public string ProjectName { get; set; }

        public ICollection<GanttDataSourceTb> GanttDataSourceTb { get; set; }
    }
}


How can i connect resources data on gantt chart?


GM Gopinath Muniraj Syncfusion Team December 29, 2020 02:51 AM UTC

Hi Kime, 
We have analyzed your query. Resources are JSON object that contains id, name, unit and group of the resources and this collection is mapped to the Gantt control using the resources property. These resource fields are mapped to the Gantt control using the resourceFields property. 
We have prepared a sample for your reference. In this example we mapped the resources for tasks in CRUD Gantt project. Please get the sample from below link.  
Please let us know if you need any further assistance on this. 
Thanks, 
Gopinath M 


Marked as answer
Loader.
Up arrow icon