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. Image for the cookie policy date

Child disappear from grid

Hi all,
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. 

Attachment: files_1dc10ee6.zip

Code I'm using for indent (taken from the examples)
      GanttControl gantt = this.GanttAttivita;
                if (CanIndent())
                    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);

1 Reply

MK Muneesh Kumar G Syncfusion Team March 26, 2019 09:20 AM UTC

Hi Davide, 
Greetings from Syncfusion Support. 
We have prepared a sample to replicate the issue based on the provided code snippet, but we are afraid, that we are not able to reproduce the issue at our end. The sample we tried can be downloaded from the below location.

Since we are not aware of your exact application scenario we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with replication procedure. Also, please update our product version used in your application. This will be helpful for us to provide you better solution at the earliest.  
Muneesh Kumar G. 

Live Chat Icon For mobile
Up arrow icon