Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismResultView.cs =================================================================== diff -u -red08434acc8f5619842f1c6cb0b7f9a56cf8dad0 -rf4c4fe2feedd73d2f45395017b77df2bb56d5c27 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismResultView.cs (.../PipingFailureMechanismResultView.cs) (revision ed08434acc8f5619842f1c6cb0b7f9a56cf8dad0) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingFailureMechanismResultView.cs (.../PipingFailureMechanismResultView.cs) (revision f4c4fe2feedd73d2f45395017b77df2bb56d5c27) @@ -42,13 +42,23 @@ private readonly RecursiveObserver calculationInputObserver; private readonly RecursiveObserver calculationOutputObserver; private readonly RecursiveObserver calculationGroupObserver; - private IAssessmentSection assessmentSection; + private readonly IAssessmentSection assessmentSection; /// /// Creates a new instance of . /// - public PipingFailureMechanismResultView() + /// The assessment section that the failure mechanism belongs to. + /// Thrown when + /// is null. + public PipingFailureMechanismResultView(IAssessmentSection assessmentSection) { + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + + this.assessmentSection = assessmentSection; + DataGridViewControl.CellFormatting += ShowAssessmentLayerTwoAErrors; DataGridViewControl.CellFormatting += DisableIrrelevantFieldsFormatting;