ErrorProvider not displaying Icons on broken CSLA business rules.

ErrorProvider not displaying Icons on broken CSLA business rules.

Old forum URL: forums.lhotka.net/forums/t/2742.aspx


ray posted on Friday, April 20, 2007

I'll try to simplify the details so this post isn't too wordy, but I'm having a problem between Validating Business Objects and rolling any Validation Errors up to the ErrorProvider.

If anyone's dealt with CAB, then you probably know it deals with WorkSpaces and SmartParts.  Well, the form I'm having a problem with contains a SmartPart within a SmartPart (e.g. this is similar to saying a a container control within in a container control)

Anyway, my outer SmartPart (which is a user control) validates fine.  This means the "ErrorProvider" icon will display if I break a validation rule.  However, the Inner SmartPart (also a user control) will not do this.  When I break a validation rule, no Error Icon appears.

I've stepped down into my object's validation and it does contain the "BrokenRule", but what must I need to do to make sure that error rolls up to the ErrorProvider?

In the design env, I've set the DataSource of the ErrorProvider to my binding source.  When the control loads, I set the BindingSource's DataSource to my CSLA Business Object.

It's exactly how I use the "outer SmartPart" except the inner one doesn't work Super Angry [8o|]

Should I be doing something with the ErrorProvider's BindToDataAndErrors or UpdateBinding methods?  I've tried using them both but it's been to no avail.

Copyright (c) Marimer LLC