TdxGanttControlTasks.Delete(Integer) Method
In This Article
Removes the specified task from the collection.
#Declaration
Delphi
procedure Delete(Index: Integer);
#Parameters
Name | Type | Description |
---|---|---|
Index | Integer | The index of the target task in the collection. |
#Remarks
Call the Delete
procedure to delete an individual task in the collection. You can use the Count property to identify the number of tasks in the collection.
#Code Examples: Delete All Tasks
The Gantt control always contains a root task, and an attempt to delete it causes an exception. The following code example iterates through all tasks and deletes all tasks except for the root:
Alternatively, you can call the data model’s Tasks.Reset procedure:
See Also