# 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.

![](/files/-MeRSNG_2poW1_lYKfzy)

### Sorting

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

![](/files/-MeRS_K2LvdJadHegRnu)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/docs/controls/lists/datagridview/checkboxcolumn.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
