# TreeDataGridTemplateColumn

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

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

```rust
struct TreeDataGridTemplateColumn
```

A template column (`TreeDataGridTemplateColumn`): cells built from a data template, given
directly or as resource keys.

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

## Members

- [`new`](#function-new)
- [`with_resource_keys`](#function-with_resource_keys)
- [`cell_template`](#function-cell_template)
- [`set_cell_template`](#function-set_cell_template)
- [`cell_editing_template`](#function-cell_editing_template)
- [`set_cell_editing_template`](#function-set_cell_editing_template)
- [`cell_template_resource_key`](#function-cell_template_resource_key)
- [`set_cell_template_resource_key`](#function-set_cell_template_resource_key)
- [`cell_editing_template_resource_key`](#function-cell_editing_template_resource_key)
- [`set_cell_editing_template_resource_key`](#function-set_cell_editing_template_resource_key)
- [`text_search_binding`](#function-text_search_binding)
- [`set_text_search_binding`](#function-set_text_search_binding)
- [`create_typed`](#function-create_typed)

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

### new

```rust
fn new() -> Rc<Self>
```



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

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

### with_resource_keys

```rust
fn with_resource_keys(header: Option<BoxedValue>, cell_template_resource_key: ResourceKey, cell_editing_template_resource_key: Option<ResourceKey>) -> Rc<Self>
```

A column of the templates of the resource keys
(`TreeDataGridTemplateColumn(header, cellTemplateResourceKey, cellEditingTemplateResourceKey)`).

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

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

### cell_template

```rust
fn cell_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```



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

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

### set_cell_template

```rust
fn set_cell_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```



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

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

### cell_editing_template

```rust
fn cell_editing_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
```



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

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

### set_cell_editing_template

```rust
fn set_cell_editing_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
```



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

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

### cell_template_resource_key

```rust
fn cell_template_resource_key(self: &Self) -> Option<ResourceKey>
```



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

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

### set_cell_template_resource_key

```rust
fn set_cell_template_resource_key(self: &Self, value: Option<ResourceKey>)
```



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

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

### cell_editing_template_resource_key

```rust
fn cell_editing_template_resource_key(self: &Self) -> Option<ResourceKey>
```



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

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

### set_cell_editing_template_resource_key

```rust
fn set_cell_editing_template_resource_key(self: &Self, value: Option<ResourceKey>)
```



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

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

### text_search_binding

```rust
fn text_search_binding(self: &Self) -> Option<Rc<dyn BindingBase>>
```

The binding of the text a type-ahead search reads (`[AssignBinding] TextSearchBinding`).

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

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

### set_text_search_binding

```rust
fn set_text_search_binding(self: &Self, value: Option<Rc<dyn BindingBase>>)
```



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

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

### create_typed

```rust
fn create_typed<M: ferroui_treedatagrid_core::accessor::TreeModel>(self: &Self) -> Rc<TemplateColumn<M>>
```

The template column of a typed source of models of `M` (`CreateTyped<TModel>`).
## Panics
When the column has neither a template nor a template resource key.

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

## 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`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- `PartialEq`
- `Deref`
- `Default`
- [`TreeDataGridColumn`](/docs/0.5.0/api/ferroui-controls-treedatagrid/trait-treedatagridcolumn/)

## Availability

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