# ValueColumnBase

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

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

```rust
struct ValueColumnBase<M: TreeModel, V: Clone + 'static>
```

`ColumnBase<TModel, TValue>`.

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

## Members

- [`new`](#function-new)
- [`column_base`](#function-column_base)
- [`value_selector`](#function-value_selector)
- [`accessor`](#function-accessor)
- [`can_write`](#function-can_write)
- [`get_comparison`](#function-get_comparison)
- [`create_binding_expression`](#function-create_binding_expression)

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

### new

```rust
fn new(header: Option<BoxedValue>, accessor: Accessor<M, V>, comparer: Option<ValueComparer<V>>, width: Option<GridLength>, options: Rc<dyn IColumnOptions<M>>) -> Self
```

The base of a column of the value `accessor` reads, sorted by `comparer` (`None`: the values
do not compare, and the column sorts only with the comparisons of its options).

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

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

### column_base

```rust
fn column_base(self: &Self) -> &ColumnBase<M>
```

The state every column has.

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

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

### value_selector

```rust
fn value_selector(self: &Self) -> &Rc<dyn Fn(&Rc<M>) -> V>
```

The function that selects the value of the column from a model (`ValueSelector`).

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

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

### accessor

```rust
fn accessor(self: &Self) -> &Accessor<M, V>
```

The accessor of the value (`Binding`: its getter, setter and observed path).

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

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

### can_write

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

Whether the cells of the column write their values back (`Binding.Write is not null`).

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

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

### get_comparison

```rust
fn get_comparison(self: &Self, direction: ListSortDirection) -> Option<Comparison<M>>
```

The comparison that sorts the models by the column in `direction`, or `None`.

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

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

### create_binding_expression

```rust
fn create_binding_expression(self: &Self, model: &Rc<M>) -> Rc<AccessorBinding<M, V>>
```

The binding of a cell of `model` (`CreateBindingExpression`).

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`

## Availability

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