I have a Windows Form with TextBox, ComboBox, DateTimePicker, and DataGridView controls. I want to lock all controls from editing until the user clicks an "Edit" button. Additionally, I need all controls to have consistent formatting while in this uneditable mode.
For ease of reading I prefer the black ControlText of the TextBox in ReadOnly mode. I wish all controls had a ReadOnly mode. I have tried to disable all other controls and set their ForeColor property to KnownColor.ControlText without success, they just remain gray -- which is difficult to read.
Alternatively, disabling the controls doesn't provide uniformity either. When I disable the DataGridView, it does not gray-out like the other controls do. I have to manually modify the DataGridView to resemble the other disabled controls.
I thought about making a read-only form that would launch an editable form for the specific record at hand but many of my fields are ComboBox/DropDownLists that wire a FK ID to the PK in another table. ComboBoxes make this very easy to do.
Any easy-on-the-eyes, easy-to-implement suggestions?