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