Hi,
I have a root business object with no childs, derived from business base which is used as binding source for various properties of a win form.
Everything it's OK, except for error provider which shows the error messages duplicated. For example instead of
"Net Price is required since product is marked 'For Sale'."
prints"Net Price is required since product is marked 'For Sale'.
Net Price is required since product is marked 'For Sale'."
This strange behaviour happens only when validation events fire. When I hit Save, the error messages are normal. I've already checked the rule methods and the properties. They seem OK.
Any ideas?
No. I have one error provider, for some reason the description string is double. When you move the mouse pointer over the red dot instead of reading for example "Code required" you read
"Code required
Code required".
The e.description is for sure correctly setted to "Code required" and not "Code required" & vbcrlf & "Code required" and I'm not drunk to see things double. :-)
I have only one ErrorProvider on my form.
I know it sounds crazy.
My friends, I figured out what was wrong.
On the various text boxes, except for the text property, I had also bind the tag property of the control to a corresponding object property. Thus, although the BrokenRulesCollection was containing only once the error, the error provider was displaying the error as many times as the number of the control binded properties.
Thanks, for any help.
Copyright (c) Marimer LLC