Looking for advice on INotifyDataErrorInfo implementation #1675
-
I am working on getting the brokenRules to notify the WPF xaml code to display the red box around the control when the value is invalid. I read that I should implement INotifyDataErrorInfo and grab the collection of errors returned. I have a complex object that is displayed flat in the UI and I'm not getting the controls highlighted when the control is skipped and is required even though I call ((ICheckRules)Model).CheckRules();. If the control has an invalid value entered, it works well (without implementing INotifyDataErrorInfo in the class.) Here are my questions, if you'd be so kind to weigh in:
If I implement INotifyDataErrorInfo, it's a couple of days worth of work and I just trying to make sure my efforts are fruitful. Thank you for taking the time to read this. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
CSLA already implements the correct interface(s) for data binding, along with all the somewhat complex behaviors required to make them actually work correctly. Why do you need to implement them yourself? |
Beta Was this translation helpful? Give feedback.
-
I'm really lost on this. I have the brokenRules collection and used BusinessRules.GetAllBrokenRules(Model); to consolidate them. I have 16 errors, but none of them display next to the control such as when the user enters an invalid value--that works wonderfully. The missed field, not so much. |
Beta Was this translation helpful? Give feedback.
-
I still don't fully understand the issue you are trying to solve. Are you saying:
??? |
Beta Was this translation helpful? Give feedback.
-
In my factory class, I added a CheckRules for the child and all is well. Presents dropped from the sky tonight! |
Beta Was this translation helpful? Give feedback.
In my factory class, I added a CheckRules for the child and all is well. Presents dropped from the sky tonight!