# TreeDataGridPresentationOptions

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

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

```rust
struct TreeDataGridPresentationOptions
```

The factories of the view columns of the presentation keys of a source's columns
(`TreeDataGridPresentationOptions<TModel>`); keys compare ordinally.

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

## Members

- [`new`](#function-new)
- [`this`](#function-this)
- [`set_column`](#function-set_column)
- [`with_column`](#function-with_column)
- [`remove_column`](#function-remove_column)
- [`column`](#function-column)
- [`keys`](#function-keys)

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

### new

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



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

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

### this

```rust
fn this(self: &Self) -> Rc<Self>
```

The shared options.

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

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

### set_column

```rust
fn set_column(self: &Self, key: impl Into<String>, factory: impl Fn(&Rc<dyn CoreColumn>) -> ColumnRef + 'static)
```

Registers the factory of the columns whose presentation key is `key` (`Columns[key] = factory`).

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

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

### with_column

```rust
fn with_column(self: Rc<Self>, key: impl Into<String>, factory: impl Fn(&Rc<dyn CoreColumn>) -> ColumnRef + 'static) -> Rc<Self>
```

Adds a factory and returns the options (a collection initializer of the reference).

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

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

### remove_column

```rust
fn remove_column(self: &Self, key: &str) -> bool
```

Removes the factory of `key`; false when there is none.

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

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

### column

```rust
fn column(self: &Self, key: &str) -> Option<ColumnPresentationFactory>
```

The factory of `key` (`Columns.TryGetValue`).

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

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

### keys

```rust
fn keys(self: &Self) -> Vec<String>
```

The keys that have a factory.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `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/)
- `PartialEq`
- [`ITreeDataGridPresentationOptions`](/docs/0.5.0/api/ferroui-controls-treedatagrid/presentation/trait-itreedatagridpresentationoptions/)

## Availability

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