skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class GanttTask

Represents the objects displayed from RadGanttView control. Every task can be a milestone, summary and a regular task.

Inheritance
System.Object
PropertyChangedBase
GanttTask
Inherited Members
PropertyChangedBase.OnPropertyChanged(String)
PropertyChangedBase.OnPropertyChanged<T>(Expression<Func<T>>)
PropertyChangedBase.PropertyChanged
Namespace: Telerik.Windows.Controls.GanttView
Assembly: Telerik.Windows.Controls.GanttView.dll

Syntax

public class GanttTask : PropertyChangedBase, INotifyPropertyChanged, IGanttTask, IResourceContainer, IStateProvider, IMilestone, ISummary, IHierarchical, IDateRange, IEditableHierarchical, IDependant

Constructors

GanttTask()

Initializes a new instance of the GanttTask class.

Declaration
public GanttTask()

GanttTask(DateTime, DateTime)

Initializes a new instance of the GanttTask class.

Declaration
public GanttTask(DateTime start, DateTime end)
Parameters
System.DateTime start

The start.

System.DateTime end

The end.

GanttTask(DateTime, DateTime, String)

Initializes a new instance of the GanttTask class.

Declaration
public GanttTask(DateTime start, DateTime end, string title)
Parameters
System.DateTime start

The start.

System.DateTime end

The end.

System.String title

The title.

Properties

Children

Gets the children (subtasks).

Declaration
public IList<IGanttTask> Children { get; }
Property Value
System.Collections.Generic.IList<IGanttTask>

Deadline

Gets or set the deadline date of the task. This property is also used for calculating the critical path.

Declaration
public Nullable<DateTime> Deadline { get; set; }
Property Value
System.Nullable<System.DateTime>

Implements
IGanttTask.Deadline

Dependencies

Collection with relations to other tasks.

Declaration
public IList<IDependency> Dependencies { get; }
Property Value
System.Collections.Generic.IList<IDependency>

Description

Gets or set the description of the task.

Declaration
public string Description { get; set; }
Property Value
System.String

Implements
IGanttTask.Description

Duration

Gets or set the duration of the task.

Declaration
public TimeSpan Duration { get; set; }
Property Value
System.TimeSpan

Implements
IGanttTask.Duration

End

Gets or sets the end.

Declaration
public DateTime End { get; set; }
Property Value
System.DateTime

The end.

Implements
IDateRange.End

IsExpired

Gets whether the GanttTask is expired, i.e. its Start or End is after the Deadline date.

Declaration
public bool IsExpired { get; }
Property Value
System.Boolean

IsMilestone

Gets or sets a value indicating whether the instance is a milestone.

Declaration
public bool IsMilestone { get; set; }
Property Value
System.Boolean

Implements
IMilestone.IsMilestone

IsSummary

Gets a value indicating whether the instance is a summary.

Declaration
public bool IsSummary { get; }
Property Value
System.Boolean

Implements
ISummary.IsSummary

Progress

Gets or set the progress in percent of completion of the task.

Declaration
public double Progress { get; set; }
Property Value
System.Double

Implements
IGanttTask.Progress

Resources

Collection with all resources associated with this task.

Declaration
public IList<IResource> Resources { get; }
Property Value
System.Collections.Generic.IList<IResource>

Start

Gets or sets the start.

Declaration
public DateTime Start { get; set; }
Property Value
System.DateTime

The start.

Implements
IDateRange.Start

Title

Gets or set the title of the task.

Declaration
public string Title { get; set; }
Property Value
System.String

Implements
IGanttTask.Title

UniqueId

Gets or sets the unique id.

Declaration
public string UniqueId { get; set; }
Property Value
System.String

The unique id.

Methods

AddDependency(IGanttTask, DependencyType)

Adds a dependency to the task. Returns the created dependency.

Declaration
public IDependency AddDependency(IGanttTask fromTask, DependencyType type)
Parameters
IGanttTask fromTask

A IGanttTask from which the dependency will be added.

DependencyType type

The type of the dependency.

Returns
IDependency

Returns an object the added dependency.

Implements
IDependant.AddDependency(IGanttTask, DependencyType)

CheckIsExpired()

Declaration
protected virtual bool CheckIsExpired()
Returns
System.Boolean

OnPropertyChanged(PropertyChangedEventArgs)

Declaration
protected override void OnPropertyChanged(PropertyChangedEventArgs args)
Parameters
System.ComponentModel.PropertyChangedEventArgs args

Overrides
PropertyChangedBase.OnPropertyChanged(PropertyChangedEventArgs)

RemoveDependency(IDependency)

Removes a dependency from a task.

Declaration
public bool RemoveDependency(IDependency dependency)
Parameters
IDependency dependency

The dependency to be removed.

Returns
System.Boolean

Returns true if item is successfully removed; otherwise, false. This method also returns false if item was not found into the collection of dependencies.

Implements
IDependant.RemoveDependency(IDependency)

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
System.String

A System.String that represents this instance.

Explicit Interface Implementations

IDependant.Dependencies

Declaration
IEnumerable IDependant.Dependencies { get; }
Returns
System.Collections.IEnumerable

Implements
IDependant.Dependencies

IGanttTask.Dependencies

Collection with relations to other tasks.

Declaration
IEnumerable IGanttTask.Dependencies { get; }
Returns
System.Collections.IEnumerable

Implements
IGanttTask.Dependencies

IResourceContainer.Resources

Gets the resources assigned to the task.

Declaration
IList IResourceContainer.Resources { get; }
Returns
System.Collections.IList

Implements
IResourceContainer.Resources

IEditableHierarchical.InsertChildAtIndex(Object, Int32)

Declaration
void IEditableHierarchical.InsertChildAtIndex(object item, int index)
Parameters
System.Object item

System.Int32 index

Implements
IEditableHierarchical.InsertChildAtIndex(Object, Int32)

IEditableHierarchical.Remove(Object)

Declaration
void IEditableHierarchical.Remove(object item)
Parameters
System.Object item

Implements
IEditableHierarchical.Remove(Object)

IHierarchical.Children

Gets the children (subtasks).

Declaration
IEnumerable IHierarchical.Children { get; }
Returns
System.Collections.IEnumerable

Implements
IHierarchical.Children

IStateProvider.LoadState(Object)

Declaration
void IStateProvider.LoadState(object state)
Parameters
System.Object state

Implements
IStateProvider.LoadState(Object)

IStateProvider.SaveState()

Declaration
object IStateProvider.SaveState()
Returns
System.Object

Implements
IStateProvider.SaveState()

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.