# ITreeDataGridSelectionFactory

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

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

```rust
trait ITreeDataGridSelectionFactory
```

The selections a source can create (`ITreeDataGridSelectionFactory`).

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

## Members

- [`create_row_selection_model`](#function-create_row_selection_model)
- [`create_cell_selection_model`](#function-create_cell_selection_model)

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

### create_row_selection_model

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

A row selection of `source`, or `None` when `source` is not of the factory's source type.

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

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

### create_cell_selection_model

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

A cell selection of `source`, or `None` when `source` is not of the factory's source type.

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

## Availability

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