How to bind data to Control.Enabled to! (Field)?
I have a field (varchar) Foo that can only be specified if (bit) Bar is not true. I would like the textbox where Foo is displayed to be disabled when Bar is true - essentially FooBox.Enabled = !isBar
. I am trying to do something like
FooBox.DataBindings.Add(new Binding("Enabled", source, "!isBar"));
but of course an explosion in it raises an exception. I've also tried constructs like "isBar! = True" or "isBar <> true", but none of them work. Am I barking the wrong tree here?
+1
source to share