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
660
IDataErrorInfo validation on Records with complex binding on unbound fields fails
posted

I have dug deep into the Record.cs source code file and found that the DataRecord class has a property named GetDataErrorInfo that returns the record's DataItem as IDataErrorInfo. However, this fails if the the Record's DataItem is a complex object of objects that support IDataErrorInfo. This complex object is the result of a LINQ to Objects query without a Select "clause" to preserve the ability to set the properties in the Objects used to build the query. Again, these objects in the linq query support IDataErrorInfo. The only way to expose the IDataErrorInfo.Error property is to loop the Cells finding UnboundFields and check if each Field's binding source supports IDataErrorInfo. Is this a bug or will the xamDataGrid never support complex binding? Is there another way to bind to multiple related sources so that I do not have to use UnboundFields and complex binding?

Thank You

Devin