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

Task Relationship persist data

Thread ID:

Created:

Updated:

Platform:

Replies:

131593 Jul 18,2017 11:40 AM Jul 27,2017 12:27 AM ASP.NET MVC 3
loading
Tags: Gantt
Manolo
Asked On July 18, 2017 11:40 AM

Hi,

I've a gantt, and I have doubts:

1. How can I set the relationships?

In gantt sample creator the relationship are defined these:
new GanttFeatureData()
                        {
                            Id = 3,
                            Name = "Child Task 2",
                            StartDate = "02/26/2014",
                           BaselineStartDate = "02/26/2014",
                             BaselineEndDate = "02/29/2014",
                            Duration = 3,
                            PercentDone = 40,
                            Predescessor = "2FS"
                        },

I think that relationships are defined by string composite in this way:

ID + Type Relationsip (SS or SF or FS or FF)

It's correct?

And how I can set offset days?

2. In gantt diagram...when I set relationship with doing drag&drop (without form) how can I save data in my database?

Thanks


Jayakumar Duraisamy [Syncfusion]
Replied On July 19, 2017 08:54 AM

Hi Manolo, 
Please find the response below. 
Query 1: How can I set the relationships? I think that relationships are defined by string composite in this way:
ID + Type Relationsip (SS or SF or FS or FF)
 
Answer: Yes, we have set the relationships with TaskIdMapping field value. 
Query 2:  how I can set offset days? 
Answer: Please refer following help documentation link to more about Predecessor offset. 
Query 3:  In gantt diagram...when I set relationship with doing drag&drop (without form) how can I save data in my database? 
Answer: In the ActionComplete event will be trigger with request type of recordUpdate, once the relationship has linked. We will also get the updated record from the argument. By using Ajax call request, we can pass the updated record to the server side for data base update. 
Please refer following code snippet, 
@(Html.EJ().Gantt("Gantt"). 
.ClientSideEvents(eve => 
        { 
         eve.ActionComplete("actionComplete"); 
} 
//…. 
function actionComplete(args) {            
 
            //To update on indent,outdent and taskbar editing action 
            if (args.requestType == "indent" || args.requestType == "outdent" || args.requestType == "recordUpdate") { 
                var data = $.extend({}, true, args.data.item);                 
                $.ajax({ 
                    type: "POST", 
                    url: '/Gantt/Update', 
                   contentType: "application/json; charset=utf-8", 
                    data: JSON.stringify(data), 
                    dataType: "json", 
                }); 
            } 
We have also prepared a sample for your reference. Please find the sample location as below, 
Please let us know, if you require any other assistance. 
Regards, 
Jayakumar D 


Manolo
Replied On July 26, 2017 05:15 AM

Thanks!


Jayakumar Duraisamy [Syncfusion]
Replied On July 27, 2017 12:27 AM

Hi Manolo, 
Thanks for the update. 
Regards, 
Jayakumar D 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;