I
Igor Anic
I have a business object which has a property bound to textbox:
txt.DataBindings.Add(new Binding("Text", obj, "MyProp"));
Object property set method for MyProp is something like:
set
{
if (...)
throw(new ApplicationException("error message"));
else
_myProp = value;
}
The problem is that I would like to display that error message to the
user. But it is eaten somewhere in the binding mechanism.
Binding is looking for the Validating event, and when the error occurs
in the property set just cancels validating.
How can I display that error to the user?
Thanks,
Igor.
txt.DataBindings.Add(new Binding("Text", obj, "MyProp"));
Object property set method for MyProp is something like:
set
{
if (...)
throw(new ApplicationException("error message"));
else
_myProp = value;
}
The problem is that I would like to display that error message to the
user. But it is eaten somewhere in the binding mechanism.
Binding is looking for the Validating event, and when the error occurs
in the property set just cancels validating.
How can I display that error to the user?
Thanks,
Igor.