0

I have a datagridview with a datagridviewcheckboxcolumn. I currently have this as a 3 state option so you get checked, unchecked and the filled square. For the 3rd state, I'd rather the cell be completely blank.

I've tried drawing fillrectangles over the box in the cellpainting event, but never could get that to look good.

Is there a way to hide the square all together so you'd see checked, unchecked, totally blank, as shown here:

Desired Effect

Dan
  • 89
  • 6
  • If the check box is set to three (3) state and you do not want a 3 state, then don’t use it. I am just saying that from a user perspective, covering up the “filled” tri-state box that indicates that a choice has not been made… then how would the user know the difference between an unchecked box and a filled (no choice) checkbox? – JohnG Nov 02 '21 at 21:36
  • That's kinda the point. This check box relies on data being checked in another column. If that data isn't present, the check isn't valid and therefore isn't run. That's what the 3rd state indicates. So checked=good, unchecked=bad, null=check not performed. – Dan Nov 03 '21 at 00:08
  • So the check box is not for the user? I am just saying, that a user looking at the check boxes will NOT be able to differentiate between unchecked = bad and null = check not performed. Sorry if I am missing something. – JohnG Nov 03 '21 at 00:20
  • The checkbox is for the user and the users have requested this feature. Any ideas how to satisfy the original request? – Dan Nov 03 '21 at 01:14
  • It sounds like you need to make your own check box control to behave as you describe. – JohnG Nov 03 '21 at 01:22

0 Answers0