Home > Software engineering >  How to set color for checkbox present in datagridview?
How to set color for checkbox present in datagridview?

Time:05-14

I have a datagridview in windows form. It looks like this.

enter image description here

In this, have one Checkbox column, two textbox column.

My requirement is need to set readonly true and set grey color for the checkbox for the country has Germany as like below.

enter image description here

Not like below

enter image description here

I need to set color for checkbox only not for datagridview cell.

Is anyone have idea for this?

CodePudding user response:

You can achieve that by setting checkbox's property: 'Enabled' as false. by that way, the checkbox cannot be clicked and its color changes automatically to grey. enter image description here

  • Related