I'm in trouble with the GanttChart.
I'm trying to use the dafult command provided with the demos for manage the tasks like add, insert and in/outdent.
But if I try to indent a child to another this line disappear from the grid but it is still present as object in the taskdetail list and in the ganttchart.
Example in attachments.
Thanks in advance.
Code I'm using for indent (taken from the examples)
GanttControl gantt = this.GanttAttivita;
for (int i = 0; i < 1; i++)
TaskDetails currentTask = gantt.SelectedItems[i] as TaskDetails;
TaskDetails parentTask = gantt.Model.GetParentOfItem(currentTask) as TaskDetails;
if (parentTask == null)
int index = gantt.Model.InbuiltTaskCollection.IndexOf(currentTask);
if (index < 1)
gantt.Model.InbuiltTaskCollection[index - 1].Child.Add(currentTask);
int currentIndex = parentTask.Child.IndexOf(currentTask);
if ((currentIndex - 1) >= 0)
parentTask.Child.Remove(currentTask as IGanttTask);
parentTask.Child[currentIndex - 1].Child.Add(currentTask);