- 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.
- 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.
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.
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 - Hold on the task and drag it 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.
- 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.
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.
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 deleting a task creates a gap in the workflow between the preceding and subsequent tasks.
- 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.
The Gantt stores the changes and allows users to use Ctrl+Z and Ctrl+Y to roll back changes.
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>