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
665
XamDataGrid and validating a cell item against an entire collection
posted

 

There is a number of posts to this forum regarding collection validation. Suggested solutions would typically rely on an entity to be aware of the collection it belongs to. The record is validated at the point of individual cell data entry. Sometimes it is preferable to validate the entire collection in one hit for performance reasons or due to the business requirements.

I have a MVVM implementation where an observable collection of entities is bound to XamDataGrid. Each Entity implements IDataErrorInfo. There is a button on a form that starts collection validation process. As a result of the validation Error property of each invalid entity is set to an appropriate error message. Is it possible without using code behind to force the grid to redisplay the collection and show record error indicator for each invalid entity?