/// <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); }
/// <summary> /// Tries to submit data input with validation. /// </summary> /// <param name="focusToErrorInput">A value indicates whether the UI element with validation error should have keyboard focus.</param> /// <returns><see langword="true"/> if data input submitted sccessfully, otherwise <see langword="false"/>.</returns> public virtual bool SubmitInput(bool focusToErrorInput = true) { RequireLayoutManager(); ScalarValidation.Validate(); if (!CanSubmitInput) { if (focusToErrorInput) { LayoutManager.FocusToInputError(); } return(false); } return(true); }