Validation On New/Inserted Row not working

Aug 18, 2009 at 7:56 PM

Hi all,

I'm having an issue with row & cell validation on newly inserted rows. I have a DataGrid with a DataErrorValidationRule for RowValidations, and a TextColumn with a DataErrorValidationRule. The grid is bound to a collection of IDateErrorInfo objects.


Everything works as expected with "normal records" (ie ones that exist initially). If I enter in an invalid string, the error styles show up; if I change an invalid string to a valid one, the error clears up.

When I insert a new row, (that is initially invalid), the error appears. However, when I modify the new record's string to a valid one, the error never clears up?

I've even (slightly) modified Vincent's DataGrid sample to show the problem as well. I simply made it so that new rows are bound to a new EditablePerson that does not have their last name set.

Any ideas or work-arounds?

Aug 28, 2009 at 3:40 AM

Anyone?