Skip to main content

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.

Gantt - Add a Task

  • “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 task is inserted.

Edit a Task

Use one of the techniques 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 - Drag the task 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 users 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 a task deletion creates a gap in the workflow between the preceding and subsequent tasks.

Gantt - Remove Task

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 undo and redo 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:

See Also