DataGrid validation errors not clearing after entering the correct value
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 5.0.301
* Windows version: 10.0.19043
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
**Problem description:**
The problem is that when using DataGrid and validating values using IDataErrorInfo, the row gets marked as invalid, but when entering the correct value, the row does not become valid. The exclamation mark is still there and the element's Validation.HasErrors remains true, which also breaks my logic of allowing to save values only when there are no validation errors on the form.
This is a very old issue - https://stackoverflow.com/questions/5099039/wpf-datagrid-validation-errors-not-clearing
My problem with the DataGrid and the form validation was solved using this workaround: https://stackoverflow.com/a/61613772/3087417
**Actual behavior:**
Invalid state of the row remains even after entering the correct value
**Expected behavior:**
Invalid state of the row gets cleared after entering the correct value
**Minimal repro:**
https://github.com/LevYas/WpfDataGridValidationRepro
Contributor guide
Assessment
This issue has not been assessed yet.