aspnet-devexpress-dot-web-dot-aspxgantt-864d8cdc.md
Contains validation settings.
Namespace : DevExpress.Web.ASPxGantt
Assembly : DevExpress.Web.ASPxGantt.v25.2.dll
NuGet Package : DevExpress.Web
public class GanttValidationSettings :
GanttSettingsBase
Public Class GanttValidationSettings
Inherits GanttSettingsBase
The following members return GanttValidationSettings objects:
| Library | Related API Members |
|---|---|
| ASP.NET Web Forms Controls | ASPxGantt.SettingsValidation |
| ASP.NET MVC Extensions | GanttSettings.SettingsValidation |
ASPxGantt allows you to validate relationships between tasks when they are edited.
Run Demo: ASPxGantt - Validation Run Demo: MVCxGantt - 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.
| |
Start to Start (SS)
|
A successor task’s start point should be equal or later than the preceding task’s start point.
| |
Finish to Finish (FF)
|
A successor task’s end point should be equal or later than the preceding task’s end point.
| |
Start to Finish (SF)
|
A successor task’s end point should be equal or later than a preceding task’s start point.
|
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):
Start to Start (SS):
Start to Finish (SF):
Finish to Finish (FF):
|
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):
Start to Start (SS):
Start to Finish (SF):
Finish to Finish (FF):
|
The control suggests the following actions in the pop-up window:
| |
Move a successor task (Task 2) to the right.
|
Finish to Start (FS):
Start to Start (SS):
Start to Finish (SF):
Finish to Finish (FF):
|
The control suggests the following actions in the pop-up window:
|
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>
The Gantt control supports the following rules for parent&child relationship validation:
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()
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.
Object StateManager PropertiesBase GanttSettingsBase GanttValidationSettings
See Also