G
Guest
I posted this message to another board and have hardly had any views on it,
leave alone answers. So I am cross-posting here.
This may be a very simple question but I can't get my head around it.
I have a textbox's enabled property bound to the IsNew property of an object.
this.txtPhone1.DataBindings.Add("Enabled", this.BindingSource, "IsNew", true);
So when the IsNew property is true, my textbox is enabled. This is correct
behavior.
However, I want to reverse this behavior. In other words, I'd like to bind
the enabled property to !IsNew, so that the textbox is disabled, when the
IsNew property is true. How can I do this without creating a new property on
the object that returns !IsNew??
Thanks,
Naveen
leave alone answers. So I am cross-posting here.
This may be a very simple question but I can't get my head around it.
I have a textbox's enabled property bound to the IsNew property of an object.
this.txtPhone1.DataBindings.Add("Enabled", this.BindingSource, "IsNew", true);
So when the IsNew property is true, my textbox is enabled. This is correct
behavior.
However, I want to reverse this behavior. In other words, I'd like to bind
the enabled property to !IsNew, so that the textbox is disabled, when the
IsNew property is true. How can I do this without creating a new property on
the object that returns !IsNew??
Thanks,
Naveen