Manage Tasks
- 3 minutes to read
#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
In the Task List, double-click a task’s cell.
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.
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.
Move - Drag the task to change its start and end time.
Resize - Drag the resize handles at the task’s edges to change the task duration.
Change progress - Move the slider to change the task’s 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.
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.
<dx:ASPxGantt ID="Gantt" >
...
<SettingsValidation EnableDependencyValidation="true" AutoUpdateParentTasks="true" />
</dx:ASPxGantt>
See Also: