I have a couple of text editors that I want to enable/disable based on the the state of a check editor.
I can do this with CheckedChange event of the check editor but I want to use data binding.
I need to bind the property "Enabled" of a TextEditor to the property "Checked" of a CheckEditor.
This will work:
textEditor.Add ( "Enabled", checkEditor, "Checked" );
However, this means that the text Editor is enabled if the check editor is checked. For better or worse (naming convention), I want to change the text of the check editor (based on customers' preferences) and the meaning of its property "Checked" is reversed.
How do I bind the property "Enabled" of the TextEditor to the negated value of the property "Checked" of the Check Editor?
Hello, There is no build in way to bind a enable state to a value of editor in Windows Forms. To best of my knowledge if you are using custom business object you can handle the change of the checked state if you expose if in a property and when this property is changed. Then you can update state of the appropriate cell of the grid.I hope this make the things clear.Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
But this definitely works:
The problem is that I want to bind to the reverse state of property Checked.
Hi,
I think the DataBindings.Add method returns a Binding object and there are events on the Binding called Parse and Format that you can use to translate the value from the data source to the property and vice versa.