# TextColumn

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

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

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

`TextColumn<TModel, TValue>`.

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

## Members

- [`new`](#function-new)
- [`from_core`](#function-from_core)
- [`with_comparer`](#function-with_comparer)
- [`options`](#function-options)
- [`value_base`](#function-value_base)
- [`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, V>, width: Option<GridLength>, options: Option<Rc<TextColumnOptions<M>>>) -> Rc<Self>
```

A text column of the value `accessor` reads (`TextColumn(header, getter, [setter,] width,
options)`); the accessor's setter makes the column's cells editable. `width` `None` is
`Auto`.

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

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

### from_core

```rust
fn from_core(column: &ValueColumn<M, V>, options: Rc<TextColumnOptions<M>>) -> Rc<Self>
```

The view of a neutral text column of the core (`TextColumn(ValueColumn<TModel, TValue>,
options)`): its header, value and width, with the view options `options`.

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

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

### with_comparer

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

A text column whose values compare with `comparer` (`None`: the column sorts only with the
comparisons of its options).

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

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

### options

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

The options of the column.

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

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

### value_base

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

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

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

<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/text_column.rs#L83)

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

### get_value

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

The value of the column for `model`.

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

<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/text_column.rs#L93)

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