# TreeDataGridPresentation

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

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

```rust
trait TreeDataGridPresentation: INotifyPropertyChanged + Any
```

The presentation of a source to the control (`TreeDataGridPresentation`).

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

## Members

- [`source_identity`](#function-source_identity)
- [`can_select_multiple`](#function-can_select_multiple)
- [`select`](#function-select)
- [`deselect`](#function-deselect)
- [`is_selected`](#function-is_selected)
- [`columns`](#function-columns)
- [`rows`](#function-rows)
- [`is_hierarchical`](#function-is_hierarchical)
- [`is_sorted`](#function-is_sorted)
- [`selection_interaction`](#function-selection_interaction)
- [`selected_items`](#function-selected_items)
- [`selected_indexes`](#function-selected_indexes)
- [`add_sorted`](#function-add_sorted)
- [`remove_sorted`](#function-remove_sorted)
- [`sort_by`](#function-sort_by)
- [`move_rows`](#function-move_rows)
- [`dispose`](#function-dispose)
- [`suspend`](#function-suspend)
- [`resume`](#function-resume)
- [`add_native_selection_changed`](#function-add_native_selection_changed)
- [`remove_native_selection_changed`](#function-remove_native_selection_changed)
- [`apply_selection_mode`](#function-apply_selection_mode)
- [`as_any`](#function-as_any)

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

### source_identity

```rust
fn source_identity(self: &Self) -> Rc<dyn Any>
```

The object the presentation presents (the source), to tell whether two presentations show
the same source.

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

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

### can_select_multiple

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



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

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

### select

```rust
fn select(self: &Self, index: &IndexPath, replace: bool)
```



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

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

### deselect

```rust
fn deselect(self: &Self, index: &IndexPath)
```



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

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

### is_selected

```rust
fn is_selected(self: &Self, index: &IndexPath) -> bool
```



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

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

### columns

```rust
fn columns(self: &Self) -> Rc<dyn IColumns>
```



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

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

### rows

```rust
fn rows(self: &Self) -> Rc<dyn ITreeDataGridRows>
```



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

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

### is_hierarchical

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



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

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

### is_sorted

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



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

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

### selection_interaction

```rust
fn selection_interaction(self: &Self) -> Option<Rc<dyn ITreeDataGridSelectionInteraction>>
```



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

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

### selected_items

```rust
fn selected_items(self: &Self) -> Option<Vec<Option<BoxedValue>>>
```



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

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

### selected_indexes

```rust
fn selected_indexes(self: &Self) -> Option<Vec<IndexPath>>
```



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

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

### add_sorted

```rust
fn add_sorted(self: &Self, handler: Rc<dyn Fn() -> ()>) -> u64
```

`Sorted`.

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

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

### remove_sorted

```rust
fn remove_sorted(self: &Self, token: u64)
```



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

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

### sort_by

```rust
fn sort_by(self: &Self, column: &ColumnRef, direction: ListSortDirection) -> bool
```



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

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

### move_rows

```rust
fn move_rows(self: &Self, indexes: &[IndexPath], target: &IndexPath, position: TreeDataGridRowDropPosition, effects: DragDropEffects)
```



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

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

### dispose

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



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

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

### suspend

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

Stops following the source while the control is detached.

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

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

### resume

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



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

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

### add_native_selection_changed

```rust
fn add_native_selection_changed(self: &Self, _handler: Rc<dyn Fn(&TreeDataGridSelectionChangedEventArgs) -> ()>) -> u64
```

`NativeSelectionChanged`: the selection of a source whose selection the control does not
interact with directly changed.

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

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

### remove_native_selection_changed

```rust
fn remove_native_selection_changed(self: &Self, _token: u64)
```



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

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

### apply_selection_mode

```rust
fn apply_selection_mode(self: &Self, _mode: TreeDataGridSelectionMode)
```

Applies the selection mode of the control (`ApplySelectionMode`).

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

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

### as_any

```rust
fn as_any(self: &Self) -> &dyn Any
```



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

## Trait implementations

- [`TreeDataGridPresentation`](/docs/0.5.0/api/ferroui-controls-treedatagrid/presentation/trait-treedatagridpresentation/)

## Availability

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