{/* Do not edit this file. It is automatically generated by API Documenter. */}


## CheckCellRenderer

A renderer that indicates whether a value is true or false.

**Signature:**

```typescript
export interface CheckCellRenderer extends CellRenderer
```
**Extends:** [CellRenderer](/refs/Interface/CellRenderer)

## Remarks

This is a renderer that displays the cell value in two states: `true`{/* */}/`false`.

If the data type of the field connected to the column is not `Boolean`{/* */}, the values specified in `trueValues` of the renderer are set to `true`{/* */}, and the values specified in `falseValues` are set to `false`{ /* */} is judged.

`TOP_EDGE`{/* */} and `BOTTOM_EDGE`{/* */} cannot be used in auto height.

\[Superclass\]

[CellRenderer](/refs/Interface/CellRenderer)

## Example


```js
//string type
column.renderer = 'check';

//object type
column.renderer = {
      "type": "check",
      "trueValues": "France,Germany",
      "falseValues": "Korea,England"
}
```

## Events

## Events

| Property | Type | Description |
| --- | --- | --- |
| [getCheckedCallback](/refs/Interface/CheckCellRenderer#getcheckedcallback) | [GetCheckedCallback](/refs/realgrid#getcheckedcallback) | A callback that determines the check value when rendering |
| [setCheckedCallback](/refs/Interface/CheckCellRenderer#setcheckedcallback) | [SetCheckedCallback](/refs/realgrid#setcheckedcallback) | A callback that determines the check result value when editing |

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [checkLocation](/refs/Interface/CheckCellRenderer#checklocation) | [IconLocation](/refs/realgrid#iconlocation) | Location of checkbox |
| [editable](/refs/Interface/CheckCellRenderer#editable) | boolean | Whether or not it can be modified with an editor independently of the check mark |
| [enterKey](/refs/Interface/CheckCellRenderer#enterkey) | boolean | Whether to enable checking with enterKey |
| [falseValues](/refs/Interface/CheckCellRenderer#falsevalues) | string | Values to be considered `false` in fields that are not of type boolean |
| [readOnlySetDisabled](/refs/Interface/CheckCellRenderer#readonlysetdisabled) | boolean | Whether to display as disabled when editable is false |
| [showInnerFocus](/refs/Interface/CheckCellRenderer#showinnerfocus) | boolean | Whether to display internal focus when selected |
| [spaceKey](/refs/Interface/CheckCellRenderer#spacekey) | boolean | Whether to enable space bar checking |
| [strictValue](/refs/Interface/CheckCellRenderer#strictvalue) | boolean | Whether to display in intermediate state if there are no values belonging to boolean data type and `trueValues` or `falseValues` |
| [threeStates](/refs/Interface/CheckCellRenderer#threestates) | boolean | Whether to include intermediate state |
| [trueValues](/refs/Interface/CheckCellRenderer#truevalues) | string | Values to be considered `true` in fields that are not of type boolean |
| [type](/refs/Interface/CheckCellRenderer#type) | 'check' | Type: Check |
| [useImages](/refs/Interface/CheckCellRenderer#useimages) | boolean | Whether to use images instead of checkboxes |

## Event Desc
### getCheckedCallback

A callback that determines the check value when rendering

`Type` - [GetCheckedCallback](/refs/realgrid#getcheckedcallback)

**Remarks:**

When `true` is returned, the check value is considered `false`{/* */}.

If not specified or when `undefined` is returned, the check value is considered `true`{/* */}.

When returning `false`, if `threeStates` is `true`, the check value is considered `undefined`{/* */}; otherwise, it is considered `true`.

The return value will affect the checked value unless `setCheckedCallback` is specified.

It follows the format of [GetCheckedCallback](/refs/realgrid#getcheckedcallback).

**Example:**


```js
const f = function(grid, itemIndex, column, value) {
 if (typeof value === "number") {
 return value % 2 === 1;
 }
 else if (typeof value ==="boolean") {
 return value;
 }
 else {
 return Boolean(v);
 }
}

column.renderer = {
 "type": "check",
 "getCheckedCallback": f
}
```

<hr/>

### setCheckedCallback

Callback that determines the check result value when editing

`Type` - [SetCheckedCallback](/refs/realgrid#setcheckedcallback)

**Remarks:**

When editing, specify the checked value in priority over `getCheckedCallback`.

It follows the format of [SetCheckedCallback](/refs/realgrid#setcheckedcallback).

**Example:**


```js
const f = function(grid, itemIndex, column, oldValue, checked) {
 if (itemIndex % 2 === 0) {
    return checked;
 } else {
    return false;
 }
}
column.renderer = {
    "type": "check",
    "setCheckedCallback": f
}
```

<hr/>

## Properties Desc

### checkLocation

Location of checkbox

`Type` - [IconLocation](/refs/realgrid#iconlocation)

<hr/>

### editable

Whether or not it can be edited with an editor, regardless of the check mark

`Type` - boolean

<hr/>

### enterKey

Whether to enable checking with enterKey

`Type` - boolean

<hr/>

### falseValues

Values to be considered `false` in fields that are not of type boolean

`Type` - string

**Remarks:**

Enter separated by commas (,).

**Example:**


```js
column.renderer = {
 "type": "check",
 "falseValues": "Korea,England"
}
```

<hr/>

### readOnlySetDisabled

Whether to display as disabled when editable is false

`Type` - boolean

<hr/>

### showInnerFocus

Whether to display internal focus when selected

`Type` - boolean

<hr/>

### spaceKey

Whether to enable checking with the space bar

`Type` - boolean

<hr/>

### strictValue

Whether to display in intermediate state if there are no values belonging to the boolean data type and `trueValues` or `falseValues`.

`Type` - boolean

**Remarks:**

If `threeStates` is `true`{/* */} and the value is not included in `trueValues`{/* */} or `falseValues`, it is displayed as an intermediate state.

<hr/>

### threeStates

Whether to include intermediate state

`Type` - boolean

**Remarks:**

If used with `strictValue` or if the value is `''`{/* */}, `undefined`{/* */}, or `null`, it is considered to be in an intermediate state.

<hr/>

### trueValues

Values to be considered `true` in fields that are not of type boolean

`Type` - string

**Remarks:**

Enter separated by commas (,).

**Example:**


```js
column.renderer = {
 "type": "check",
 "trueValues": "France,Germany"
}
```

<hr/>

### type

Type: Check

`Type` - 'check'

<hr/>

### useImages

Whether to use images instead of checkboxes

`Type` - boolean

**Remarks:**

Just specify an image for each CSS class.

\[list of css style names\]

check `true` style name: "rg-check-renderer-checked"

check `false` style name: "rg-check-renderer-unchecked"

`intermediate` style name: "rg-check-renderer-intermediate"

<hr/>