Back to Devexpress

Data Editing and Validation

wpf-400927-controls-and-libraries-gantt-control-data-editing-and-validation.md

latest4.0 KB
Original Source

Data Editing and Validation

  • Aug 09, 2023
  • 2 minutes to read

Edit Data in the Gantt Area

The Interactive Editing article explains how to edit data in the Gantt Area.

Edit Data in the Treelist Area

The Treelist Area uses the TreeListControl functionality. Refer to the Data Editing and Validation topic for information on how to edit data.

Since Gantt Columns are ColumnBase descendants, you can use techniques described in the following help topic to format cell values: Format Cell Values.

Edit Resources

Users can edit resources in the Treelist Area. They should invoke an editor and check resources they want to assign to a task. They also can change the percentage of time a resource spends on a task.

Automatic Scheduling

The GanttControl can recalculate and update dependent tasks and summaries when a user modifies a task.

Forward Scheduling

Backward Scheduling

API

APIDescription
GanttView.AllowSchedulingOnEditingIf enabled, the GanttControl re-schedules tasks after each change.
GanttView.ScheduleModeA schedule mode ( Forward or Backward ) that specifies how the GanttControl recalculates task properties.
GanttView.ScheduleTask / GanttView.ScheduleDependentTasksCall these methods to re-schedule tasks on demand if the GanttView.AllowSchedulingOnEditing property is false.
GanttView.ScheduleAllCall this method to re-schedule all Gantt tasks.
GanttView.TasksScheduledThis event allows you to rollback changes if they create invalid links.
GanttView.DeleteTaskUse this method to delete a task and re-schedule the affected tasks.

If a task that a user changed conflicts with defined dependencies, the GanttControl marks these dependencies as invalid. Refer to the Validation topic for more information.

Data Edit Requirements

The GanttControl retrieves its data from an external source. Users can edit Gantt tasks only when the related data fields are editable. If a data field is read-only, runtime edit operations that affect this field are disabled.

Edit OperationAffected Properties and Their Data Fields
Move tasksStartDate , FinishDate
Resize tasksDuration , FinishDate
Change a task progressProgress
Create, edit, and remove task connectorsStartDate and FinishDate of a successor task

Validate Data

The Validation article explains how to validate data.