Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Getting the Index of an Active Task
posted

How do i get the index of the Active Task in the ultraganttview?

 

Thank

  • 69832
    Verified Answer
    Offline posted

    void ganttView_ActiveTaskChanged(object sender, ActiveTaskChangedEventArgs e)
    {
        if ( this.ganttView.ActiveTask == null )
            return;

        Task parent = this.ganttView.ActiveTask.Parent;
        TasksCollection parentCollection = parent != null ? parent.Tasks : this.ganttView.CalendarInfo.Tasks;
        int index = parentCollection.IndexOf( this.ganttView.ActiveTask );

        int rowNumber = this.ganttView.ActiveTask.RowNumber;
    }