# CheckBoxColumn

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-treedatagrid/models/struct-checkboxcolumn/

**struct** · [`ferroui-controls-treedatagrid`](/docs/0.5.0/api/ferroui-controls-treedatagrid/) · v0.5.0

```rust
struct CheckBoxColumn<M: TreeModel>
```

`CheckBoxColumn<TModel>`: a column of a `bool?` value.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L17)

## Members

- [`new`](#function-new)
- [`new_three_state`](#function-new_three_state)
- [`with_three_state`](#function-with_three_state)
- [`from_core`](#function-from_core)
- [`options`](#function-options)
- [`value_base`](#function-value_base)
- [`is_three_state`](#function-is_three_state)
- [`set_header`](#function-set_header)
- [`get_value`](#function-get_value)
- [`create_cell_of`](#function-create_cell_of)

<a id="function-new"></a>

### new

```rust
fn new(header: Option<BoxedValue>, accessor: Accessor<M, bool>, width: Option<GridLength>, options: Option<Rc<CheckBoxColumnOptions<M>>>) -> Rc<Self>
```

A two-state check box column of a `bool` (`CheckBoxColumn(header, Expression<Func<TModel,
bool>>, setter, width, options)`): the accessor's setter makes the column editable, and a
cleared value writes `false`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L28)

<a id="function-new_three_state"></a>

### new_three_state

```rust
fn new_three_state(header: Option<BoxedValue>, accessor: Accessor<M, Option<bool>>, width: Option<GridLength>, options: Option<Rc<CheckBoxColumnOptions<M>>>) -> Rc<Self>
```

A three-state check box column of a `bool?` (`CheckBoxColumn(header, Expression<Func<TModel,
bool?>>, setter, width, options)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L39)

<a id="function-with_three_state"></a>

### with_three_state

```rust
fn with_three_state(header: Option<BoxedValue>, accessor: Accessor<M, Option<bool>>, width: Option<GridLength>, options: Option<Rc<CheckBoxColumnOptions<M>>>, is_three_state: bool) -> Rc<Self>
```

A check box column of a `bool?` with the given number of states.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L49)

<a id="function-from_core"></a>

### from_core

```rust
fn from_core(column: &ValueColumn<M, Option<bool>>, options: Rc<CheckBoxColumnOptions<M>>) -> Rc<Self>
```

The view of a neutral check box column of the core (`CheckBoxColumn(CheckBoxColumn<TModel>,
options)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L69)

<a id="function-options"></a>

### options

```rust
fn options(self: &Self) -> &Rc<CheckBoxColumnOptions<M>>
```

The options of the column.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L81)

<a id="function-value_base"></a>

### value_base

```rust
fn value_base(self: &Self) -> &ValueColumnBase<M, Option<bool>>
```

The value part of the column (`ColumnBase<TModel, bool?>`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L86)

<a id="function-is_three_state"></a>

### is_three_state

```rust
fn is_three_state(self: &Self) -> bool
```

Whether the check boxes have an indeterminate state.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L91)

<a id="function-set_header"></a>

### set_header

```rust
fn set_header(self: &Self, value: Option<BoxedValue>)
```

Sets the column header.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L96)

<a id="function-get_value"></a>

### get_value

```rust
fn get_value(self: &Self, model: &Rc<M>) -> Option<bool>
```

The value of the column for `model`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L101)

<a id="function-create_cell_of"></a>

### create_cell_of

```rust
fn create_cell_of(self: &Self, model: &Rc<M>) -> CellRef
```

The cell of `model`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/check_box_column.rs#L106)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`IViewColumn<M>`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-iviewcolumn/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`INotifyPropertyChanged`](/docs/0.5.0/api/ferroui-base/data/model/use-inotifypropertychanged/)
- [`IColumn`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-icolumn/)
- [`IUpdateColumnLayout`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-iupdatecolumnlayout/)
- [`ICellColumn`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-icellcolumn/)
- [`IColumnOf<M>`](/docs/0.5.0/api/ferroui-treedatagrid-core/models/trait-icolumnof/)
- [`IValueColumn<M>`](/docs/0.5.0/api/ferroui-treedatagrid-core/models/trait-ivaluecolumn/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
