# TreeDataGridCell

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

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

```rust
struct TreeDataGridCell
```

The base class of the cell controls 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_cell.rs#L33)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`begin_rebind`](#function-begin_rebind)
- [`end_rebind`](#function-end_rebind)
- [`realize`](#function-realize)
- [`unrealize`](#function-unrealize)
- [`update_value`](#function-update_value)
- [`on_model_property_changed`](#function-on_model_property_changed)
- [`is_selected_property`](#function-is_selected_property)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`construct`](#function-construct)
- [`column_index`](#function-column_index)
- [`row_index`](#function-row_index)
- [`is_editing`](#function-is_editing)
- [`model`](#function-model)
- [`is_selected`](#function-is_selected)
- [`is_effectively_selected`](#function-is_effectively_selected)
- [`begin_edit`](#function-begin_edit)
- [`cancel_edit`](#function-cancel_edit)
- [`end_edit`](#function-end_edit)
- [`subscribe_to_model_changes`](#function-subscribe_to_model_changes)
- [`unsubscribe_from_model_changes`](#function-unsubscribe_from_model_changes)
- [`raise_cell_value_changed`](#function-raise_cell_value_changed)
- [`update_row_index`](#function-update_row_index)
- [`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_cell.rs#L51)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### begin_rebind

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

Begins a synchronous replacement of this cell's row. The presenter still calls
`unrealize` and `realize`, including their normal clearing/prepared events. This hook is
not called when a cell is merely returned to the recycle pool.

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

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

### end_rebind

```rust
fn end_rebind(self: &Self, realized: bool)
```

Ends the synchronous replacement, including when a lifecycle callback panics.
`realized` is true only when `realize` completed successfully. On false, release any
presentation state retained by `begin_rebind`. Do not assume the model or indexes were
reset if a callback failed partway through.

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

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

### realize

```rust
fn realize(self: &Self, factory: &Rc<TreeDataGridElementFactory>, selection: Option<&dyn ITreeDataGridSelectionInteraction>, model: &CellRef, column_index: i32, row_index: i32)
```

Binds the cell to `model`, the cell of the column at `column_index` in the row at
`row_index`.

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

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

### unrealize

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

Releases the cell's model.

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

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

### update_value

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

Reads the value of the model again (`UpdateValue`).

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

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

### on_model_property_changed

```rust
fn on_model_property_changed(self: &Self, property_name: &str)
```

A property of the model changed (`OnModelPropertyChanged`); `property_name` is the name
of the property, empty when all properties changed.

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

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

### is_selected_property

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

Defines the `IsSelected` property.

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

<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_cell.rs#L327)

<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_cell.rs#L334)

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

### column_index

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

The index of the cell's column, or -1 when the cell is not realized.

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

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

### row_index

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

The index of the cell's row, or -1 when the cell is not realized.

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

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

### is_editing

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

Whether the cell is being edited.

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

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

### model

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

The cell model the cell is bound to.

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

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

### is_selected

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

Whether the cell is selected.

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

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

### is_effectively_selected

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

Whether the cell or its row is selected.

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

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

### begin_edit

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

Begins editing the cell.

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

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

### cancel_edit

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

Ends editing the cell, discarding the edit.

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

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

### end_edit

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

Ends editing the cell, committing the edit.

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

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

### subscribe_to_model_changes

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

Follows the property changes of the model (`SubscribeToModelChanges`).

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

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

### unsubscribe_from_model_changes

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

Stops following the property changes of the model (`UnsubscribeFromModelChanges`).

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

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

### raise_cell_value_changed

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

Raises the control's `CellValueChanged` for the cell when it is realized and not being
edited (`RaiseCellValueChanged`).

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

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

### update_row_index

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

The row of the realized cell changed (`UpdateRowIndex`).

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

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

### update_selection

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

Updates the selection state of the cell (`UpdateSelection`).

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TreeDataGridCellImplExt`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-treedatagridcellimplext/)
- `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<TreeDataGridCell>`](/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/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`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/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`TreeDataGridCellImpl`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-treedatagridcellimpl/)
- [`INaturalWidthMeasureCache`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-inaturalwidthmeasurecache/)
- [`ITreeDataGridCell`](/docs/0.5.0/api/ferroui-controls-treedatagrid/primitives/trait-itreedatagridcell/)

## Availability

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