Skip to main content

GanttValidationSettings Class

Contains validation settings.

Namespace: DevExpress.Web.ASPxGantt

Assembly: DevExpress.Web.ASPxGantt.v24.2.dll

Declaration

public class GanttValidationSettings :
    GanttSettingsBase

The following members return GanttValidationSettings objects:

Library Related API Members
ASP.NET Web Forms Controls ASPxGantt.SettingsValidation
ASP.NET MVC Extensions GanttSettings.SettingsValidation

Remarks

ASPxGantt allows you to validate relationships between tasks when they are edited.

Run Demo: ASPxGantt - Validation Run Demo: MVCxGantt - Validation

Dependency Rules Validation

The Gantt control supports the following dependency types:

Dependency Type

Dependency Rule

Finish to Start (FS)

A successor task’s start point should be equal or later than the preceding task’s end point. DevExpress ASP.NET Web Forms Gantt - Dependency - Finish-To-Start

Start to Start (SS)

A successor task’s start point should be equal or later than the preceding task’s start point. DevExpress ASP.NET Web Forms Gantt - Dependency - Start-To-Start

Finish to Finish (FF)

A successor task’s end point should be equal or later than the preceding task’s end point. DevExpress ASP.NET Web Forms Gantt - Dependency - Finish-To-Finish

Start to Finish (SF)

A successor task’s end point should be equal or later than a preceding task’s start point. DevExpress ASP.NET Web Forms Gantt - Dependency - Start-To-Finish

Users actions can violate the dependency rules. The following table demonstrates how ASPxGantt handles these situations:

User Action

Dependency Type

Gantt’s Reaction

Move a predecessor task (Task 1) to the left or right.

Finish to Start (FS):
Gantt - Finish to Start Dependency
Start to Start (SS):
Gantt - Start to Start Dependency
Start to Finish (SF):
Gantt - Start to Finish Dependency
Finish to Finish (FF):
Gantt - Finish to Finish Dependency

The control moves a successor task (Task 2) forward or backward to the same time interval.

Move a successor task (Task 2) to the left.

Finish to Start (FS):
Gantt - Finish to Start Dependency
Start to Start (SS):
Gantt - Start to Start Dependency
Start to Finish (SF):
Gantt - Start to Finish Dependency
Finish to Finish (FF):
Gantt - Finish to Finish Dependency

The control suggests the following actions in the pop-up window:

  • Do nothing.
  • Delete the dependency.

Move a successor task (Task 2) to the right.

Finish to Start (FS):
Gantt - Finish to Start Dependency
Start to Start (SS):
Gantt - Start to Start Dependency
Start to Finish (SF):
Gantt - Start to Finish Dependency
Finish to Finish (FF):
Gantt - Finish to Finish Dependency

The control suggests the following actions in the pop-up window:

  • Do nothing.
  • Delete the dependency.
  • Move the task and keep the dependency.
    This action creates a gap between tasks. Note that you can move a successor task forward/backward within this gap and resize it while the dependency rules are not violated.

Set the EnableDependencyValidation property to true to enable dependency rules validation.

Web Forms:

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

MVC:

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.SettingsValidation.EnableDependencyValidation = true;
    ...
}).Bind(
    GanttDataProvider.Tasks, 
    GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, 
    GanttDataProvider.ResourceAssignments
).GetHtml()

According to the dependency rules described above, the Gantt control allows you to change the gap between tasks only if you move or resize the successor task.

You can set the EnablePredecessorGap property to true to enable this functionality for the predecessor.

<dx:ASPxGantt ID="Gantt" runat="server" ClientInstanceName="clientGantt" EnableViewState="false" ...>
    <SettingsValidation EnableDependencyValidation="true" EnablePredecessorGap="true" />
    <!--...-->
</dx:ASPxGantt>

Parent-Child Relationship Validation

The Gantt control supports the following rules for parent&child relationship validation:

  • A parent task’s duration equals a summary duration of its child tasks.
  • A parent task and its first child start at the same time.
  • A parent task and its last child end at the same time.
  • A parent task’s progress is a summary progress of its child tasks.

Set the AutoUpdateParentTasks property to true to enable validation for parent&child relationships.

Web Forms:

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

MVC:

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.SettingsValidation.AutoUpdateParentTasks = true;
    ...
}).Bind(
    GanttDataProvider.Tasks, 
    GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, 
    GanttDataProvider.ResourceAssignments
).GetHtml()

Gantt - AutoUpdateParentTasks Property

Note

When the EnableDependencyValidation and AutoUpdateParentTasks properties are enabled, the Gantt does not allow users to specify dependencies between a child task and its parent, regardless of the child’s nesting level.

Concepts

Implements

Inheritance

See Also