Can't get ErrorProvider to show broken rule description

Can't get ErrorProvider to show broken rule description

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


Carlos posted on Saturday, March 22, 2008

I'm doing my first Windows Forms project using CSLA v3 (I've used CLSA a couple of times in the past for Web projects) and I've bumped into an annoying issue that I can't get past. 

I've set up the databindings on my forms "the easy way" (meaning dragging and dropping from the Data Sources window) and everything ties up together wonderfully.  I've added an ErrorProvider control with it's DataSource to the binding source and a BindingSourceRefresh control with ReadValuesOnChanged set to true.

The validations from the object seem to fire off correctly, since I get the red exclamation icon next to the controls, however, I cannot for the life of me get it to show the description of the broken rules on the mouse-over tool tip.

I found this previous thread which aluded to the issue

http://forums.lhotka.net/forums/thread/18707.aspx

but didn't mention any real way of resolving it.

For now, all my rules are per-type rules with the default severity (which I believe is Error) which means it should be displaying them, right? However it's not.

Any ideas?

ajj3085 replied on Monday, March 24, 2008

are you sure you're setting e.Description if the validation fails?

Carlos replied on Monday, March 24, 2008

Most of my rules are of the CommonRules type (MaxLength, StringRequired, etc.) I don't need to set a description for those, do I?

For my custom rules, I am setting the Description, and even the FriendlyName property, which is why I'm puzzled.

Copyright (c) Marimer LLC