How do I make a checkbox tri-state?
At times, when you bind a checkbox to a table field that allows nulls, you may want the checkbox to have three states:
- Selected
- Unselected
- Indeterminate
This is the default behavior for checkboxes added to DataGrids. However, if you want a standalone checkbox to have this behavior, you must set its ThreeState property to true.
The following image shows how each of these states is rendered in Windows Forms:
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 07/29/03
Comment or report problem with topic
