# TreeDataGridRow

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

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

```rust
struct TreeDataGridRow
```

A row of a [`TreeDataGrid`](/docs/0.5.0/api/ferroui-controls-treedatagrid/struct-treedatagrid/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L32)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_realized`](#function-on_realized)
- [`on_row_index_changed`](#function-on_row_index_changed)
- [`on_unrealizing`](#function-on_unrealizing)
- [`columns_property`](#function-columns_property)
- [`element_factory_property`](#function-element_factory_property)
- [`is_selected_property`](#function-is_selected_property)
- [`rows_property`](#function-rows_property)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`columns`](#function-columns)
- [`element_factory`](#function-element_factory)
- [`set_element_factory`](#function-set_element_factory)
- [`is_selected`](#function-is_selected)
- [`model`](#function-model)
- [`rows`](#function-rows)
- [`cells_presenter`](#function-cells_presenter)
- [`row_index`](#function-row_index)
- [`realize`](#function-realize)
- [`try_get_cell`](#function-try_get_cell)
- [`update_index`](#function-update_index)
- [`unrealize`](#function-unrealize)
- [`unrealize_on_item_removed`](#function-unrealize_on_item_removed)
- [`finalize_unrealize`](#function-finalize_unrealize)
- [`update_selection`](#function-update_selection)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

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

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<TreeDataGridRow>
```

Returns a strong reference to this object.

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

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

### on_realized

```rust
fn on_realized(self: &Self, row_index: i32)
```

Called after this row has been realized and its primary cells presenter has been
updated. `row_index` is the realized row index.

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

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

### on_row_index_changed

```rust
fn on_row_index_changed(self: &Self, old_row_index: i32, new_row_index: i32)
```

Called after the index of this realized row and its primary cells has changed.

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

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

### on_unrealizing

```rust
fn on_unrealizing(self: &Self, row_index: i32, reason: TreeDataGridRowUnrealizeReason)
```

Called before this row and its primary cells presenter are unrealized. `row_index` is
the row index that is about to be cleared and `reason` the reason the row is being
unrealized.

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

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

### columns_property

```rust
fn columns_property() -> &'static DirectProperty<TreeDataGridRow, Option<Rc<dyn IColumns>>>
```

Defines the `Columns` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L61)

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

### element_factory_property

```rust
fn element_factory_property() -> &'static DirectProperty<TreeDataGridRow, Option<Rc<TreeDataGridElementFactory>>>
```

Defines the `ElementFactory` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L61)

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

### is_selected_property

```rust
fn is_selected_property() -> &'static DirectProperty<TreeDataGridRow, bool>
```

Defines the `IsSelected` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L61)

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

### rows_property

```rust
fn rows_property() -> &'static DirectProperty<TreeDataGridRow, Option<Rc<dyn ITreeDataGridRows>>>
```

Defines the `Rows` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L61)

<a id="assoc_const-pseudo_classes"></a>

### PSEUDO_CLASSES

```rust
const PSEUDO_CLASSES: PseudoClassesAttribute
```

The pseudoclasses set by the class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L231)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L234)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L249)

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

### columns

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

The columns of the row.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L254)

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

### element_factory

```rust
fn element_factory(self: &Self) -> Option<Rc<TreeDataGridElementFactory>>
```

The factory of the cells of the row.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L263)

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

### set_element_factory

```rust
fn set_element_factory(self: &Self, value: Option<Rc<TreeDataGridElementFactory>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L267)

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

### is_selected

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

Whether the row is selected.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L272)

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

### model

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

The model of the row: its data context.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L281)

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

### rows

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

The rows the row belongs to.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L286)

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

### cells_presenter

```rust
fn cells_presenter(self: &Self) -> Option<Ref<TreeDataGridCellsPresenter>>
```

The cells presenter of the row's template.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L295)

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

### row_index

```rust
fn row_index(self: &Self) -> i32
```

The index of the row, or -1 when it is not realized.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L300)

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

### realize

```rust
fn realize(self: &Self, element_factory: Option<&Rc<TreeDataGridElementFactory>>, selection: Option<&dyn ITreeDataGridSelectionInteraction>, columns: Option<&Rc<dyn IColumns>>, rows: Option<&Rc<dyn ITreeDataGridRows>>, row_index: i32)
```

Realizes the row for the row at `row_index` of `rows`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L309)

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

### try_get_cell

```rust
fn try_get_cell(self: &Self, column_index: i32) -> Option<Ref<Control>>
```

The realized cell of the column at `column_index`, if any.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L334)

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

### update_index

```rust
fn update_index(self: &Self, index: i32)
```

The index of the realized row changed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L339)

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

### unrealize

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

Unrealizes the row, to be recycled for another row.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L353)

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

### unrealize_on_item_removed

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

Unrealizes the row because its item was removed from the source.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L367)

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

### finalize_unrealize

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

Releases the cells kept for a rebind when the row was not rebound (`FinalizeUnrealize`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L381)

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

### update_selection

```rust
fn update_selection(self: &Self, selection: Option<&dyn ITreeDataGridSelectionInteraction>)
```

Updates the selection state of the row and its cells (`UpdateSelection`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/primitives/tree_data_grid_row.rs#L388)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TreeDataGridRowImplExt`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-treedatagridrowimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<TreeDataGridRow>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`TreeDataGridRowImpl`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-treedatagridrowimpl/)

## Availability

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