I have a checkbox with a Checked property and a Listbox with an Enabled property. I'd like to data bind the controls in such a manner that when the user checks the Checkbox, the listbox becomes enabled. Conversely, when the user unchecks the checkbox, the listbox becomes disabled.
How can I do something like that?
Sorry, I should have done a bit of googling. The answer is actually pretty simple:
cbo.DataBindings.Add("Enabled", chk, "Checked");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With