Hi Martin,
Please find the response below,
Query 1: I can make a task to a child if I use the indent, then the tree on the left side will show it as well. If I now load back the data, the Tree will not be shown as it should, I add some pictures what I mean.
Answer: We have analyzed the reported issue in our sample but unable to reproduce it. Hence, we have prepared a sample to preform indent/outdent operations and please ensure that the new parentId value properly updated in the table of parentId mapping column.
Also, ensure that the following code snippet,
if (args.requestType === 'outdent' || args.requestType === 'indent' || args.requestType === 'recordUpdate') {
var ganttRec = args.data.item;
PageMethods.UpdateIt(ganttRec);
} |
Query 2: If I press the add button, how can I archieve that this task will be per now a child task?
Answer: In Gantt EditSettings, have an API called RowPosition. By using this API, we can set the newly inserted record position as Top, Bottom, Above, Below, Child. Hence, set RowPosition as ‘Child’ then new added record will be inserted as child record of selected item.
<ej:Gantt ID="Gantt"
//…
<EditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" AllowIndent="true" EditMode="normal" RowPosition="Child" /> |
Please find the sample location as below,
If you are facing the same issue again, please revert us with modified sample which can able to reproduce the issue. It will help us to serve you better.
Regards,
Jayakumar D