Split task with self-referential

Hi, do you have an example for split tasks with self-referential data using URL Adapter? I'm using a SQL Database.

I'm having trouble to replicate this example from ViewBag into URL Adapter (also updates/deletes/insert segments):

https://ej2.syncfusion.com/aspnetmvc/documentation/gantt/data-binding/#self-referential

https://ej2.syncfusion.com/aspnetmvc/Gantt/SplitTasks#/bootstrap4


Much appreciated.

Regards.


16 Replies

MS Monisha Sivanthilingam Syncfusion Team September 20, 2021 12:16 PM UTC

Hi Rodrigo, 
 
Greetings from Syncfusion support. 
 
We can achieve your requirement by adding the segments field in the BatchUpdate method. This way, the creation, updating and deletion of segments will be maintained in the database also. The following code snippets demonstrate the solution. 
 
HomeController.cs 
 
public GanttData Edit(GanttData value) 
{ 
   GanttData result = db.GanttDatas.Where(currentData => currentData.TaskId == value.TaskId).FirstOrDefault(); 
   if (result != null) 
   { 
      result.TaskId = value.TaskId; 
      result.TaskName = value.TaskName; 
      result.StartDate = value.StartDate; 
      result.EndDate = value.EndDate; 
      result.Duration = value.Duration; 
      result.Progress = value.Progress; 
      result.Predecessor = value.Predecessor; 
      result.Segments = value.Segments; 
      db.SaveChanges(); 
      return result; 
   } 
   else 
   { 
      return null; 
   } 
} 
 
 
We have prepared  a sample for your reference. 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 



RO Rodrigo September 20, 2021 07:24 PM UTC

Hi Monisha, thank you for your quick response.


I'm looking at the code, i see you use the Segments property in GanttData class, but there's no Segments field or table in the Database included in the project. Can't read or write split-task data. I'm attaching an image:


168970pic6.png


Thanks for your help.



MK Mahalakshmi Karthikeyan Syncfusion Team September 21, 2021 05:14 PM UTC

Hi Rodrigo, 
 
It is possible to handle the splittask objects in the separate table and map them to Gantt as like the resource fields. We are currently working on the custom sample and we will update the sample in 2 business days (23rd September, 2021) 

Regards, 
Mahalakshmi K. 



RO Rodrigo replied to Mahalakshmi Karthikeyan September 27, 2021 06:42 PM UTC

Hi Mahalakshmi, thanks for your response. Will be waiting for the sample.


Regards,



LA Lokesh Arjunan Syncfusion Team September 28, 2021 03:23 PM UTC

Hi Rodrigo, 
 
Sorry for the inconvenience caused. 
 
We are facing difficulties in creating custom sample. However, we will update you with custom sample within two business days(30/09/2021). 
 
Until then we appreciate your patience. 
 
Regards, 
Lokesh 



RO Rodrigo replied to Lokesh Arjunan October 1, 2021 04:28 AM UTC

Hi Lokesh, thanks for your response. Will be waiting for the sample.


Regards,



LA Lokesh Arjunan Syncfusion Team October 4, 2021 12:50 PM UTC

Hi Rodrigo 

We are working on custom sample with splittask data. We will update you shortly. 

Regards, 
Lokesh 



LA Lokesh Arjunan Syncfusion Team October 5, 2021 02:47 AM UTC

Hi Rodrigo, 
 
We are facing issue for the requirement you reported and have considered this as a bug. We have logged a bug report for it. You can track its status from the below feedback link.  
  
  
The fix will be provided in the patch release scheduled for October 20th, 2021. 
 
Until then we appreciate your patience.  

Regards, 
Lokesh 



RO Rodrigo replied to Lokesh Arjunan October 7, 2021 03:52 AM UTC

Hi Lokesh. Thank you very much. Will be waiting for the realease.



RP Ranjani Prabakaran Syncfusion Team October 11, 2021 04:32 AM UTC

Hi Rodrigo, 

We will let you know once the release is rolled out. We appreciate your patience until then. 

Regards, 

Ranjani 



MS Monisha Sivanthilingam Syncfusion Team October 26, 2021 06:16 AM UTC

Hi Rodrigo, 
 
Thank you for your patience. 
 
The reported issue “Segments data not updated properly” has been fixed in version v19.3.46. Please find the release notes from the below link. 
 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 



RO Rodrigo replied to Monisha Sivanthilingam October 26, 2021 04:04 PM UTC

Hi Moshina. Thank you very much for the follow-up.


The initial request in this thread was for an example for segments CRUD. There was an example attached on september 20th but was incomplete. Please check my response with screenshots also on september 20th. Could you attach the example with segments CRUD using URL Adapter?


Thank you very much.



MS Monisha Sivanthilingam Syncfusion Team October 28, 2021 02:03 AM UTC

Hi Rodrigo, 
 
Currently, we are working on preparing a custom sample with split task data. We will provide you with a sample in two business days(October 29, 2021). 
 
We appreciate your patience until then. 
 
Regards, 
Monisha. 



RO Rodrigo replied to Monisha Sivanthilingam November 1, 2021 05:29 AM UTC

Hi Monisha, is the custom example available? Thank you very much.

Regards.



RO Rodrigo replied to Monisha Sivanthilingam November 7, 2021 08:37 PM UTC

Hi Monisha, is the custom example availabe? Thank you very much.


Regards.



MS Monisha Sivanthilingam Syncfusion Team November 12, 2021 06:10 AM UTC

Hi Rodrigo, 
 
We apologize for the delay. 
 
We have prepared a custom sample to load the segments data from an external data table. Please find the sample from the below link. 
 
 
We have given example to load the segments data from another table in load time. We have to follow the same procedure for editing operations also. Please refer the below documentation link for more information. 
 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Loader.
Up arrow icon