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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Child disappear from grid

Thread ID:

Created:

Updated:

Platform:

Replies:

143529 Mar 25,2019 02:31 PM UTC Mar 26,2019 09:20 AM UTC WPF 1
loading
Tags: GanttControl
Davide Scaccabarozzi
Asked On March 25, 2019 02:42 PM UTC

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

EDIT: 
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)
                                continue;
                            gantt.Model.InbuiltTaskCollection.Remove(currentTask);
                            gantt.Model.InbuiltTaskCollection[index - 1].Child.Add(currentTask);
                        }
                        else
                        {
                            int currentIndex = parentTask.Child.IndexOf(currentTask);
                            if ((currentIndex - 1) >= 0)
                            {
                                parentTask.Child.Remove(currentTask as IGanttTask);
                                parentTask.Child[currentIndex - 1].Child.Add(currentTask);
                            }
                        }
                        gantt.SelectedItems.Clear();
                        gantt.SelectedItems.Add(currentTask);
                    }
                }

Muneesh Kumar G [Syncfusion]
Replied On 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.  
 
Regards, 
Muneesh Kumar G. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;