# TreeDataGridSourcePresentation

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

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

```rust
struct TreeDataGridSourcePresentation
```

The presentation of a core source (`TreeDataGridPresentation<TModel>`).

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

## Members

- [`new`](#function-new)
- [`of`](#function-of)
- [`model`](#function-model)
- [`presentation_columns`](#function-presentation_columns)
- [`presentation_rows`](#function-presentation_rows)
- [`is_suspended`](#function-is_suspended)
- [`is_disposed`](#function-is_disposed)
- [`suspend_presentation`](#function-suspend_presentation)
- [`resume_presentation`](#function-resume_presentation)
- [`dispose_presentation`](#function-dispose_presentation)
- [`get_model`](#function-get_model)
- [`row_selection`](#function-row_selection)
- [`cell_selection`](#function-cell_selection)
- [`shared`](#function-shared)

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

### new

```rust
fn new(model: Rc<dyn ITreeDataGridSource>, options: Option<Rc<TreeDataGridPresentationOptions>>) -> Rc<Self>
```

The presentation of `model` with `options` (the default options when `None`).
## Panics
When a column of the source has a presentation key with no registered presentation, or
the source's selection is not a row or cell selection of the core.

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

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

### of

```rust
fn of<M: TreeModel, S: ITreeDataGridSourceOf<M> + 'static>(model: Rc<S>, options: Option<Rc<TreeDataGridPresentationOptions>>) -> Rc<Self>
```

The presentation of a typed source, registering its model and source types
(`new TreeDataGridPresentation<TModel>(model, options)`).

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

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

### model

```rust
fn model(self: &Self) -> &Rc<dyn ITreeDataGridSource>
```

The source presented (`Model`).

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

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

### presentation_columns

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

The view columns (`Columns`), as the presentation's own type.

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

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

### presentation_rows

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

The rows (`Rows`), as the presentation's own type.

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

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

### is_suspended

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

Whether the presentation is suspended (detached from its control).

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

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

### is_disposed

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

Whether the presentation is disposed.

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

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

### suspend_presentation

```rust
fn suspend_presentation(self: &Self)
```

Stops following the source while the control is detached (`Suspend`).

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

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

### resume_presentation

```rust
fn resume_presentation(self: &Self)
```

Follows the source again after the control is attached (`Resume`).
## Panics
When a column of the source has a presentation key with no registered presentation.

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

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

### dispose_presentation

```rust
fn dispose_presentation(self: &Self)
```

Releases the view columns and stops following the source (`Dispose`).

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

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

### get_model

```rust
fn get_model(self: &Self, column: &ColumnRef) -> Option<Rc<dyn CoreColumn>>
```

The core column of the view column `column` (`GetModel`).

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

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

### row_selection

```rust
fn row_selection(self: &Self) -> Option<Rc<dyn ITreeSelectionModel>>
```

The row selection the presentation presents, if it is one (`_selection`).

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

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

### cell_selection

```rust
fn cell_selection(self: &Self) -> Option<Rc<dyn IUntypedCellSelection>>
```

The cell selection the presentation presents, if it is one (`_cellSelection`).

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

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

### shared

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

The shared presentation.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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/)
- [`TreeDataGridPresentation`](/docs/0.5.0/api/ferroui-controls-treedatagrid/presentation/trait-treedatagridpresentation/)
- `Drop`

## Availability

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