Hi,
I would like to bind the "Font.Strikeout" property on one control based on the value in another control. For example, I have a column called "Setup Time" that I display in a form using an UltraNumericEditor control. I want the Setup Time control to have the strikeout applied when the value in another column called "Production Reported" is set to Yes. The following is the code I am trying to use but it is not working. Can you help me figure out the best way to do this?
if (fieldName == Constants.WorkOrderSetupTimeFieldName)
aControl.DataBindings.Add(new System.Windows.Forms.Binding("Font.Strikeout",_dataSource, Constants.WorkOrderIsProductionReportedFieldName, true, DataSourceUpdateMode.OnValidation));
With this particular code I get an arugment exception error saying that I cannot bind to the Strikeout property on the Setup Time control ...
Steve
Like the error says that is not a bindable property. What you should do is handle the ValueChanged event for the "Production Reported" control, and set the UltraNumericEditor.Appearance.FontData.Strikeout property to True on the "Setup Time" control in that handler.