# CheckBoxColumn

The **DataGridViewCheckBoxColumn** class is a specialized type of the **DataGridViewColumn** class used to logically host cells that indicate binary state. A **DataGridViewCheckBoxColumn** has an associated **DataGridViewCheckBoxCell** in every **DataGridViewRow** that intersects it. Each cell supplies a user interface (UI) that is similar to a **CheckBox** control.

The default sort mode for this column type is `NotSortable`.

Typically, check box cell values are intended either for storage, like any other data, or for performing bulk operations. If you want to respond immediately when users click a check box cell, you can handle the **DataGridView\.CellContentClick** event, but this event occurs before the cell value is updated. If you need the new value at the time of the click, one option is to calculate what the expected value will be based on the current value. Another approach is to commit the change immediately, and handle the **DataGridView\.CellValueChanged** event to respond to it.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation](https://docs.wisej.com/api/wisej.web/lists-and-grids/datagridview/wisej.web.datagridviewcheckboxcolumn).
{% endhint %}

## Features

### Three State

The **ThreeState** property defines whether the checkbox cells will allow three check states or the default two check states.

![](https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-1295db889163ce8ea17a3e8df3176d04a317c34f%2Fimage.png?alt=media)

### Sorting

The **DataGridViewCheckBoxColumn** can also be sorted according to the cells value in ascending or descending order:

![](https://553579532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MF1D11gPs_az3xaKusw%2Fuploads%2Fgit-blob-040f0e13e8d235f989d773a7f092decd5d663624%2Fimage.png?alt=media)
