# TreeDataGridSourceExtensions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-treedatagrid/trait-treedatagridsourceextensions/

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

```rust
trait TreeDataGridSourceExtensions<M: TreeModel>: Sized
```

The fluent helpers of the sources (`TreeDataGridSourceExtensions`): each adds a column of the
control crate to the source and returns it.

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

## Members

- [`column_list`](#function-column_list)
- [`with_row_header_column`](#function-with_row_header_column)
- [`with_text_column`](#function-with_text_column)
- [`with_check_box_column`](#function-with_check_box_column)
- [`with_three_state_check_box_column`](#function-with_three_state_check_box_column)
- [`with_template_column`](#function-with_template_column)
- [`with_template_column_from_resource_keys`](#function-with_template_column_from_resource_keys)

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

### column_list

```rust
fn column_list(self: &Self) -> &ColumnList<M>
```

The columns of the source.

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

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

### with_row_header_column

```rust
fn with_row_header_column(self: Self, header: Option<BoxedValue>, configure: impl FnOnce(&mut ColumnCreateOptions<M>) -> ()) -> Self
```

Adds a column of row numbers (`WithRowHeaderColumn`).

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

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

### with_text_column

```rust
fn with_text_column<V: Clone + PartialEq + PartialOrd + 'static>(self: Self, header: Option<BoxedValue>, getter: Accessor<M, V>, configure: impl FnOnce(&mut TextColumnCreateOptions<M>) -> ()) -> Self
```

Adds a text column of the value `getter` reads (`WithTextColumn`); without a header, the
header is the name of the member read.

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

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

### with_check_box_column

```rust
fn with_check_box_column(self: Self, header: Option<BoxedValue>, getter: Accessor<M, bool>, configure: impl FnOnce(&mut CheckBoxColumnCreateOptions<M>) -> ()) -> Self
```

Adds a two-state check box column (`WithCheckBoxColumn`).

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

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

### with_three_state_check_box_column

```rust
fn with_three_state_check_box_column(self: Self, header: Option<BoxedValue>, getter: Accessor<M, Option<bool>>, configure: impl FnOnce(&mut CheckBoxColumnCreateOptions<M>) -> ()) -> Self
```

Adds a three-state check box column (`WithThreeStateCheckBoxColumn`).

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

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

### with_template_column

```rust
fn with_template_column(self: Self, header: Option<BoxedValue>, cell_template: Rc<dyn IDataTemplate>, cell_editing_template: Option<Rc<dyn IDataTemplate>>, configure: impl FnOnce(&mut TemplateColumnCreateOptions<M>) -> ()) -> Self
```

Adds a template column (`WithTemplateColumn`).

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

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

### with_template_column_from_resource_keys

```rust
fn with_template_column_from_resource_keys(self: Self, header: Option<BoxedValue>, cell_template_resource_key: ResourceKey, cell_editing_template_resource_key: Option<ResourceKey>, configure: impl FnOnce(&mut TemplateColumnCreateOptions<M>) -> ()) -> Self
```

Adds a template column whose templates are resources (`WithTemplateColumnFromResourceKeys`).

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

## Trait implementations

- [`TreeDataGridSourceExtensions<M>`](/docs/0.5.0/api/ferroui-controls-treedatagrid/trait-treedatagridsourceextensions/)

## Availability

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