URGENT DATABINDING QUESTION !!! 1000 pts
Posted on 2004-09-15
I have binded a textbox to an object using (textbox1.databindings.add... etc)
my object throws a custom exception (made by me) in order to tell the user that certain data can't be assigned to a property.
but the only thing that I'm getting rigth now is that when I enter the "invalid data" the application didn't let me change the focus to another control, but no exception message is displayed and no runtime exception is generated.
public class dog
private pName as string
public property Name() as string
set (byval value as string)
if value="hello" then
dim ex as new exception("value not permitted")
now lets supose that I need to bind an instance of this class to a textbox
I do this using the following
dim x as new dog
but when i change the value of the textbox in run time, I've got NO EXCEPTION
how can I do to catch an exception that is being ignored.
or maybe I'm doing something wrong.