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.
Hi Brian ... Thank you for the response. I don't seem to have the ValueChanged event for the controls I'm using in my winform. I have events like Validated and Validating but I'm not sure that those would work in this case as I need for the Setup Time field to have the Strikeout applied without the user necessarily entering/exiting any of the controls. I'm also not sure that ValueChanged would work in this case as the "Production Reported" field is set when the application comes up and it cannot be changed by the user. The only time it could change is when the user refreshes the data in the application. Is there another event I can use so that I can apply the strikeout? We are currenlty using version 7.3 of the Infragistics toolset.
Thank you!
Did the information Brian provide help you?
Do you have any other questions regarding this issue?