All docs
V20.2
21.2 (EAP/Beta)
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
A newer version of this page is available. Switch to the current version.

Manage Tasks

  • 3 minutes to read

Run Demo: Data Binding and Editing

Add a Task

Right-click a task and select the “Add” context menu item.

  • “New Task” - Appends a new task at the same level as the selected task.

    Gantt - New Task

  • “New Subtask” - Adds a child task to the selected task.

    Gantt - New Subtask

Related API:

  • InsertTask(data) - A client-side method that inserts a new task.
  • TaskInserting - A client-side event that occurs before a task is inserted.
  • TaskInserted - A server-side event that occurs when a is inserted.

Edit a Task

Use one of the approaches described below to edit a task.

  • Inline Edit Mode

    In the Task List, double-click a task’s cell.

    Gantt - Inline Editing

  • Popup Edit Form

    Use the “Task Details” context menu item (or double-click a task in the chart area) to invoke the popup edit form that also provides access to the ‘Resource Manager’ dialog.

    Gantt - Popup Edit Form

    View Example: How to implement a custom "Task Details" dialog

  • Drag-And-Drop Mode

    Hover the mouse pointer over the task you want to modify. The Gantt displays a rectangle around the task and a hint with information.

    Gantt - Resize Task - Select

    Move - Hold on the task and drag it to change its start and end time.

    Gantt - Move Task

    Resize - Drag the resize handles at the task’s edges to change the task duration.

    Gantt - Resize Task

    Change progress - Move the slider to change the task’s progress.

    Gantt - Edit Task Progress

Related API:

  • UpdateTask(key, data) - A client-side method that updates a task.
  • TaskUpdating - A client-side event that occurs before a task is updated.
  • TaskUpdated - A server-side event that occurs when a task is updated.
  • TaskMoving - A client-side event that occurs before a task is moved.
  • DataUpdate - A server-side event that occurs when Gantt data is updated.

Save Changes

The Gantt submits changes to the server and refreshes task values in the chart when you edit data in inline or drag-and-drop edit modes.

Gantt - Edit Tasks - Save Changes

In the “Task Details” dialog, click OK to get task values from the edit form and save them to the database.

Gantt - Edit Tasks - Dialog

Remove a Task

Right-click a task and select the ‘Delete Task’ context menu item to remove a task.

Gantt - Remove Tasks

The alert message notifies users that deleting a task creates a gap in the workflow between the preceding and subsequent tasks.

Gantt - Task Remove Result

Related API:

  • DeleteTask(key) - A client-side method that deletes a task.
  • TaskDeleting - A client-side event that occurs before a task is deleted.
  • TaskDeleted - A server-side event that occurs when a task is deleted.

Undo/Redo Changes

The Gantt stores the changes and allows users to use Ctrl+Z and Ctrl+Y to roll back changes.

Gantt - Undo and Redo

Validate Tasks

Use the GanttValidationSettings object to access settings that allow you to validate relationships between tasks when they are edited.

<dx:ASPxGantt ID="Gantt" >
    ...
    <SettingsValidation EnableDependencyValidation="true" AutoUpdateParentTasks="true" />
</dx:ASPxGantt>

See Also: