RadiantQ WPF Gantt
How to find the last descendant of an activity/task?
Previous Topic  Next Topic 

How to find the last descendant of an activity/task?


You can use the GanttControl.GetIndexOfLastDescendant method for this purpose as follows:


            // Get the current selected activity view:

            IActivityView selItem = this.ganttControl.GanttTable.SelectedItem as IActivityView;

            // Find the index of the last descendant

            int lastActivityIndex = this.ganttControl.GetIndexOfLastDescendant(selItem);

            // Get hold of the last descendant

            IActivity lastDescendant = this.ganttControl.ActivityViews[lastDescendant].Activity;




� RadiantQ 2009 - 2019. All Rights Reserved.