示例#1
0
 private void UpdateAsyncErrors(RowPresenter rowPresenter, IDataValidationErrors errors)
 {
     ClearAsyncErrors(rowPresenter);
     if (errors.Count > 0)
     {
         AsyncErrorsByRow.Add(rowPresenter, errors);
     }
 }
示例#2
0
        /// <summary>
        /// Sets the async validation errors.
        /// </summary>
        /// <param name="validationResults">The validation results.</param>
        public void SetAsyncErrors(IDataValidationResults validationResults)
        {
            if (_asyncErrorsByRow != null)
            {
                _asyncErrorsByRow.Clear();
            }

            for (int i = 0; i < validationResults.Count; i++)
            {
                var entry        = validationResults[i];
                var rowPresenter = _inputManager[entry.DataRow];
                if (rowPresenter != null)
                {
                    AsyncErrorsByRow.Add(rowPresenter, entry.Errors);
                }
            }
            InvalidateView();
        }