Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
305
INotifyDataErrorInfo for non-editor controls in XamGrid
posted

We have implemented the INotifyDataErrorInfo in our view model and are able to see the error messages in the cells for a row that is in edit mode. This works fine for validations that are triggered when we tab out of cells and so on. The controls are highlighted with the error message.

However, we do some of the validations upon a button click for all selected rows and validation is also performed on the server. Upon return of data from the server, the event is raised and we can see the framework calling into GetErrors(), but the errors do not show up. We have attempted to modify the ItemTemplate control (usually a TextBox) with the

NotifyOnValidationError=True, ValidatesOnDataErrors=True, ValidatesOnNotifyDataErrors=True

on the textbox's binding. But this does not show the errors on the ItemTemplate. Is this functionality only available on the EditorTemplate?

This is not optimal because the user won't see any errors until they click on that row, so in fact may not know they are there?

Is there a way to get this to work? Is there an alternative or work-around?