C
Curt Gough
I have a DataGridView with a DataGridViewButtonColumn that I want to use to
enable and disable records in the grid. When the button is clicked I have
code to change the value in a field called 'Enabled' from True to False, or
from False to True.
I can set the Text property of the button through the GUI. But what I really
want is to set the property in code during the CellFormatting event so that
the button reads 'Enable' when the record is disabled, or 'Disable' when the
record is enabled. I currently set the backcolor property for 'Disabled'
records in that event. How can I change the button text at the same time?
enable and disable records in the grid. When the button is clicked I have
code to change the value in a field called 'Enabled' from True to False, or
from False to True.
I can set the Text property of the button through the GUI. But what I really
want is to set the property in code during the CellFormatting event so that
the button reads 'Enable' when the record is disabled, or 'Disable' when the
record is enabled. I currently set the backcolor property for 'Disabled'
records in that event. How can I change the button text at the same time?