Here is the situation: I have a dataset bound to a WPF window. The dataset implements the IDataErrorInfo, so when a value is changed in the window, a validation occurs for the specific property changed. During validation, I may find out there is another control in the window I need to validate. I know only the field name in the Dataset that I need to validate, and not the actual control that binds to this field. So my questions are: 1. How can I find out what control binds to a specific field in a Dataset? 2. How do I trigger validation on that control by code?
Thanks!
Two options as I see it:
PropertyChanged
event on the 2nd property, to force the view to reevaluate it.I would prefer the 1st option, since you know changing the 1st property has a chance to invalidate the other property.