/// <inheritdoc/> public override bool SubmitInput(bool focusToErrorInput = true) { RequireLayoutManager(); if (IsEditing) { CurrentRow.EndEdit(); } if (IsEditing) { return(false); } RowValidation.Validate(); ScalarValidation.Validate(); if (!CanSubmitInput) { if (focusToErrorInput) { LayoutManager.FocusToInputError(); } return(false); } return(true); }
internal override void FlushCore(T element, bool isFlushing, bool isProgressiveFlushing) { Debug.Assert(isFlushing || isProgressiveFlushing); Debug.Assert(CurrentRow != null); var currentRow = CurrentRow; if (currentRow != element.GetRowPresenter()) { if (isFlushing) { throw new InvalidOperationException(DiagnosticMessages.RowInput_FlushCurrentRowOnly); } else { return; } } var valueChanged = DoFlush(currentRow, element); var makeProgress = isProgressiveFlushing || IsValidationVisible; RowValidation.OnFlushed(this, isProgressiveFlushing || IsValidationVisible, valueChanged); }
/// <summary> /// Determines whether validation error exists for specified row presenter. /// </summary> /// <param name="rowPresenter">The row presenter.</param> /// <returns><see langword="true"/> if validation error exists, otherwise <see langword="false"/>.</returns> public bool HasValidationError(RowPresenter rowPresenter) { rowPresenter.VerifyNotNull(nameof(rowPresenter)); return(RowValidation.HasError(rowPresenter, this, true)); }
/// <summary> /// Get the validation info. /// </summary> /// <param name="rowPresenter">The row presenter.</param> /// <returns>The validation info.</returns> public ValidationInfo GetValidationInfo(RowPresenter rowPresenter) { rowPresenter.VerifyNotNull(nameof(rowPresenter)); return(RowValidation.GetInfo(rowPresenter, this)); }
public Snapshot(RowValidation rowValidation) { _rowValidation = rowValidation; _progress = GetProgress(rowValidation._progress, rowValidation.CurrentRow); _valueChanged = GetProgress(rowValidation._valueChanged, rowValidation.CurrentRow); }