Hi,
I am working on an application which extensively uses XamDataGrid. We have recently started implementing data validations in our application. Below are the steps that we follow for validations in all our controls -
1. Add a reference to System.ComponentModel.DataAnnotations.dll to the project – for adding annotations to the properties that we want to validate.
2. Added Range/Required(or other) attribute to the properties of the domain object that need to be validated
3. Implemented IDataErrorInfo interface in the class.
4. Added IsValid Property to ViewModel which is set to true when there are no errors present in the screen. The setter of the property raises the CanExecuteChanged event of the Save button which has to be disabled in case of errors.
5. Added ErrorChangedHandler in xaml.cs which tests if there are any errors and sets the IsValid property accordingly.
6. Added ValidatesOnExceptions=true, ValidatesOnDataErrors=true, NotifyOnValidationError=true in the Binding expressions for the controls to be validated.
7. Added SupportDataErrorInfo="RecordsAndCells" DataErrorDisplayMode="ErrorIconAndHighlight" to the FieldLayoutSettings of the XamDataGrid.
For normal controls this process works fine and the ErrorChangedHandler gets called. But this handler does not get called whenever an error occurs in the XAMDataGrid.
I have made a sample application. I have attached it.
If we change the value of the property in the grid in order to satisfy the range attribute, the error indication at the cell level gets removed but the error indication at the record level does not get removed.
Please take a look and let me know what needs to be done to get this working.
Hi All
Looks like I'm also having exactly the same issue.
I've already opened an issue with the following reference:
Support Case# CAS-69292-VDF7CZ
Hope this helps for a faster solution on this issue!
Best regards
Hi Vlad,
i have the same problem, any news?
I created a support ticket with a reference number of CAS-58835-VJRN8K and I will get back to you on e-mail with more details on the issues you raised.