# TreeDataGridRowSelectionInteraction

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

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

```rust
struct TreeDataGridRowSelectionInteraction
```

The interaction of a row selection with the control (`TreeDataGridRowSelectionInteraction<TModel>`).

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

## Members

- [`new`](#function-new)
- [`with_model`](#function-with_model)
- [`selection`](#function-selection)
- [`source`](#function-source)
- [`dispose`](#function-dispose)
- [`handle_text_input`](#function-handle_text_input)

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

### new

```rust
fn new(source: Rc<dyn ITreeDataGridSource>, selection: Rc<dyn IUntypedRowSelection>) -> Rc<Self>
```

The interaction of the row selection `selection` of `source`, following its `StateChanged`.

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

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

### with_model

```rust
fn with_model(source: Rc<dyn ITreeDataGridSource>, selection: Rc<dyn ITreeSelectionModel>) -> Rc<Self>
```

The interaction of a tree selection of `source` whose row selection type is not known: it
follows the selection's own events in place of `StateChanged`.

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

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

### selection

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

The tree selection model of the rows.

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

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

### source

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

The source of the rows.

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

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

### dispose

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

Stops following the selection (`Dispose`).

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

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

### handle_text_input

```rust
fn handle_text_input(self: &Self, text: Option<&str>, tree_data_grid: &TreeDataGrid, selected_row_index: i32)
```

`HandleTextInput`: type-ahead search of the columns that search their text, from the row
after `selected_row_index`.

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

## 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`
- [`ITreeDataGridSelectionInteraction`](/docs/0.5.0/api/ferroui-controls-treedatagrid/selection/trait-itreedatagridselectioninteraction/)
- `Drop`

## Availability

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