I'm using a DxDataGrid in an Angular Application. In this Application I want to enter 4 Dates. Now I need to apply some validation rules, which work fine for each field separatly. The problem is that i need to validate all four fields if one of them changes. For Example: If I enter a endDate which is before the startDate I get the validation error as expected in the endDate-field. If I change the startDate now to some time before the endDate the validation error in the endDate-field remains, because this field is not revalidated.
This is what I have so far:
<dx-data-grid>
<dxi-column dataField="inPeriodStart" caption="In-Period Start" dataType="date"">
<dxi-validation-rule reevaluate="true" type="custom" message="Both start and end period has to be specified"
[validationCallback]="validateStartAndEndInPeriod"></dxi-validation-rule>
<dxi-validation-rule reevaluate="true" type="custom" message="Start has to be before end." [validationCallback]="validateStartBeforeEnd"></dxi-validation-rule>
<dxi-validation-rule reevaluate="true" type="custom" message="Either In-Period or For-Period has to be specified."
[validationCallback]="validateInOrForSpecified"></dxi-validation-rule>
<dxi-validation-rule type="custom" [validationCallback]="verifyDate" message="In-Period Start must be a valid date"></dxi-validation-rule>
</dxi-column>
<dxi-column dataField="inPeriodEnd" caption="In-Period End" dataType="date">
//same rules
</dxi-column>
<dxi-column dataField="forPeriodStart" caption="For-Period Start" dataType="date">
//same rules
</dxi-column>
<dxi-column dataField="forPeriodEnd" caption="For-Period End" dataType="date">
// same rules
</dxi-column>
</dx-data-grid>
How do I solve this problem? Thanks for any input