# HierarchicalExpanderColumn

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

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

```rust
struct HierarchicalExpanderColumn<M: TreeModel>
```

`HierarchicalExpanderColumn<TModel>`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L29)

## Members

- [`new`](#function-new)
- [`inner`](#function-inner)
- [`child_selector`](#function-child_selector)
- [`has_children_selector`](#function-has_children_selector)
- [`is_expanded_selector`](#function-is_expanded_selector)
- [`actual_width`](#function-actual_width)
- [`has_children`](#function-has_children)
- [`get_child_models`](#function-get_child_models)
- [`create_expander_cell`](#function-create_expander_cell)

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

### new

```rust
fn new(inner: Rc<dyn IViewColumn<M>>, child_selector: impl Fn(&Rc<M>) -> Option<Models<M>> + 'static, has_children_selector: Option<Accessor<M, bool>>, is_expanded_selector: Option<Accessor<M, bool>>) -> Rc<Self>
```

A column that shows `inner` with an expander. `child_selector` gives the children of a
model; `has_children_selector` whether a model has children without selecting them (only
needed when selecting the children is expensive); `is_expanded_selector` a read/write
expansion state of the model (its setter writes the state back).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L46)

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

### inner

```rust
fn inner(self: &Self) -> &Rc<dyn IViewColumn<M>>
```

The column that defines how the cells are shown.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L76)

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

### child_selector

```rust
fn child_selector(self: &Self) -> &ChildSelector<M>
```

The selector of the child models.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L81)

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

### has_children_selector

```rust
fn has_children_selector(self: &Self) -> Option<&Accessor<M, bool>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L85)

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

### is_expanded_selector

```rust
fn is_expanded_selector(self: &Self) -> Option<&Accessor<M, bool>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L89)

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

### actual_width

```rust
fn actual_width(self: &Self) -> f64
```

The width of the column after measurement.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L94)

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

### has_children

```rust
fn has_children(self: &Self, model: &Rc<M>) -> bool
```

Whether `model` has children.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L106)

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

### get_child_models

```rust
fn get_child_models(self: &Self, model: &Rc<M>) -> Option<Models<M>>
```

The child models of `model`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L114)

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

### create_expander_cell

```rust
fn create_expander_cell(self: &Self, row: Rc<dyn IExpanderRow<M>>, row_ref: &RowRef) -> CellRef
```

The cell of the expander row `row`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/TreeDataGrid/FerroUI.Controls.TreeDataGrid/models/hierarchical_expander_column.rs#L119)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`IViewColumn<M>`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-iviewcolumn/)
- [`IViewExpanderColumn<M>`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-iviewexpandercolumn/)
- `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`
- `Drop`
- [`INotifyPropertyChanged`](/docs/0.5.0/api/ferroui-base/data/model/use-inotifypropertychanged/)
- [`IColumn`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-icolumn/)
- [`IUpdateColumnLayout`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-iupdatecolumnlayout/)
- [`ICellColumn`](/docs/0.5.0/api/ferroui-controls-treedatagrid/models/trait-icellcolumn/)
- [`IColumnOf<M>`](/docs/0.5.0/api/ferroui-treedatagrid-core/models/trait-icolumnof/)
- [`IExpanderColumn<M>`](/docs/0.5.0/api/ferroui-treedatagrid-core/models/trait-iexpandercolumn/)

## Availability

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