Back to Devexpress

Manage Tasks

aspnet-401579-components-gantt-edit-data-manage-tasks.md

latest3.8 KB
Original Source

Manage Tasks

  • Jun 18, 2021
  • 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.

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

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

  • Popup Edit Form

  • Drag-And-Drop Mode

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.

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

Remove a Task

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

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

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.

Validate Tasks

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

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

See Also :

See Also

ASPxGantt

ASPxClientGantt