# ITreeDataGridModelSupport

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

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

```rust
trait ITreeDataGridModelSupport
```

The typed operations on the selections and rows of a model type.

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

## Members

- [`as_row_selection`](#function-as_row_selection)
- [`as_cell_selection`](#function-as_cell_selection)
- [`update_show_expander`](#function-update_show_expander)
- [`clear_show_expander`](#function-clear_show_expander)

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

### as_row_selection

```rust
fn as_row_selection(self: &Self, selection: &Rc<dyn ITreeDataGridSelection>) -> Option<Rc<dyn IUntypedRowSelection>>
```

The selection as a row selection of the model type.

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

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

### as_cell_selection

```rust
fn as_cell_selection(self: &Self, selection: &Rc<dyn ITreeDataGridSelection>) -> Option<Rc<dyn IUntypedCellSelection>>
```

The selection as a cell selection of the model type.

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

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

### update_show_expander

```rust
fn update_show_expander(self: &Self, row: &RowRef, value: bool) -> bool
```

Sets whether a hierarchical row of the model type shows its expander
(`IExpanderRow<T>.UpdateShowExpander`); false when the row is not one.

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

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

### clear_show_expander

```rust
fn clear_show_expander(self: &Self, row: &RowRef)
```

Forgets the explicit expander state of a hierarchical row (`HierarchicalRow<T>.ClearShowExpander`).

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

## Availability

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