I have a winForm with a DataGridView control. It contains 5 columns, one of them is a CheckBox column. I want to enable/disable checkbox cell of this column based on the value present in another column at the same row.
I can disable entire column using DisabledCheckBoxCell
But it makes entire column in disabled state.
Here is a snippet of DataGridView,
SourceColumn | DestinationColumn
true | enabled
true | enabled
false | disabled
Does anyone have idea, how this can be achieved in .Net.
Best Answer
Vijay,
DataGridViewCheckBoxColumn does not have property called disabled so by changing the style of the checkbox you can make it look like as if it is disabled. Look at the following code.