# TreeDataGrid

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

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

```rust
struct TreeDataGrid
```

Displays hierarchical and tabular data together in a single view (`TreeDataGrid`).

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

## Members

- [`model`](#function-model)
- [`set_model`](#function-set_model)
- [`presentation_options`](#function-presentation_options)
- [`set_presentation_options`](#function-set_presentation_options)
- [`presentation`](#function-presentation)
- [`items_source`](#function-items_source)
- [`set_items_source`](#function-set_items_source)
- [`selection_mode`](#function-selection_mode)
- [`set_selection_mode`](#function-set_selection_mode)
- [`column_definitions`](#function-column_definitions)
- [`selection_changed`](#function-selection_changed)
- [`generated_source`](#function-generated_source)
- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`create_default_element_factory`](#function-create_default_element_factory)
- [`auto_drag_drop_rows_property`](#function-auto_drag_drop_rows_property)
- [`can_user_resize_columns_property`](#function-can_user_resize_columns_property)
- [`can_user_sort_columns_property`](#function-can_user_sort_columns_property)
- [`columns_property`](#function-columns_property)
- [`element_factory_property`](#function-element_factory_property)
- [`rows_property`](#function-rows_property)
- [`scroll_property`](#function-scroll_property)
- [`show_column_headers_property`](#function-show_column_headers_property)
- [`source_property`](#function-source_property)
- [`model_property`](#function-model_property)
- [`presentation_options_property`](#function-presentation_options_property)
- [`presentation_property`](#function-presentation_property)
- [`items_source_property`](#function-items_source_property)
- [`selection_mode_property`](#function-selection_mode_property)
- [`row_drag_started_event`](#function-row_drag_started_event)
- [`row_drag_over_event`](#function-row_drag_over_event)
- [`row_drop_event`](#function-row_drop_event)
- [`TEMPLATE_PARTS`](#assoc_const-template_parts)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`auto_drag_drop_rows`](#function-auto_drag_drop_rows)
- [`set_auto_drag_drop_rows`](#function-set_auto_drag_drop_rows)
- [`can_user_resize_columns`](#function-can_user_resize_columns)
- [`set_can_user_resize_columns`](#function-set_can_user_resize_columns)
- [`can_user_sort_columns`](#function-can_user_sort_columns)
- [`set_can_user_sort_columns`](#function-set_can_user_sort_columns)
- [`columns`](#function-columns)
- [`element_factory`](#function-element_factory)
- [`set_element_factory`](#function-set_element_factory)
- [`rows`](#function-rows)
- [`column_headers_presenter`](#function-column_headers_presenter)
- [`rows_presenter`](#function-rows_presenter)
- [`scroll`](#function-scroll)
- [`show_column_headers`](#function-show_column_headers)
- [`set_show_column_headers`](#function-set_show_column_headers)
- [`column_selection`](#function-column_selection)
- [`row_selection`](#function-row_selection)
- [`source`](#function-source)
- [`set_source`](#function-set_source)
- [`selection_interaction`](#function-selection_interaction)
- [`cell_clearing`](#function-cell_clearing)
- [`cell_prepared`](#function-cell_prepared)
- [`cell_value_changed`](#function-cell_value_changed)
- [`row_clearing`](#function-row_clearing)
- [`row_prepared`](#function-row_prepared)
- [`selection_changing`](#function-selection_changing)
- [`row_drag_started`](#function-row_drag_started)
- [`row_drag_over`](#function-row_drag_over)
- [`row_drop`](#function-row_drop)
- [`try_get_cell`](#function-try_get_cell)
- [`try_get_row`](#function-try_get_row)
- [`try_get_cell_of`](#function-try_get_cell_of)
- [`try_get_row_of`](#function-try_get_row_of)
- [`try_get_row_model`](#function-try_get_row_model)
- [`query_cancel_selection`](#function-query_cancel_selection)
- [`raise_cell_clearing`](#function-raise_cell_clearing)
- [`raise_cell_prepared`](#function-raise_cell_prepared)
- [`raise_cell_value_changed`](#function-raise_cell_value_changed)
- [`raise_row_clearing`](#function-raise_row_clearing)
- [`raise_row_prepared`](#function-raise_row_prepared)
- [`raise_row_drag_started`](#function-raise_row_drag_started)

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

### model

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

The framework-neutral source (`Model`). The control owns view state, never this model.

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

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

### set_model

```rust
fn set_model(self: &Self, value: Option<TreeDataGridSourceRef>)
```

Sets `model`.

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

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

### presentation_options

```rust
fn presentation_options(self: &Self) -> Option<Rc<dyn crate::presentation::ITreeDataGridPresentationOptions>>
```

The options of the presentation of the model (`PresentationOptions`).

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

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

### set_presentation_options

```rust
fn set_presentation_options(self: &Self, value: Option<Rc<dyn crate::presentation::ITreeDataGridPresentationOptions>>)
```

Sets `presentation_options`.

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

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

### presentation

```rust
fn presentation(self: &Self) -> Option<PresentationRef>
```

The presentation of the source shown (`Presentation`).

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

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

### items_source

```rust
fn items_source(self: &Self) -> Option<ItemsSource>
```

The items whose rows the declarative columns show (`ItemsSource`).

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

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

### set_items_source

```rust
fn set_items_source(self: &Self, value: Option<ItemsSource>)
```

Sets `items_source`.

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

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

### selection_mode

```rust
fn selection_mode(self: &Self) -> TreeDataGridSelectionMode
```

How rows or cells are selected (`SelectionMode`).

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

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

### set_selection_mode

```rust
fn set_selection_mode(self: &Self, value: TreeDataGridSelectionMode)
```

Sets `selection_mode`.

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

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

### column_definitions

```rust
fn column_definitions(self: &Self) -> &crate::TreeDataGridColumns
```

The declarative columns (`[Content] ColumnDefinitions`).

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

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

### selection_changed

```rust
fn selection_changed(self: &Self, handler: impl Fn(&TreeDataGridSelectionChangedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`SelectionChanged`: the rows or cells selected changed. Disposing the returned handle
unsubscribes.

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

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

### generated_source

```rust
fn generated_source(self: &Self) -> Option<TreeDataGridSourceRef>
```

The source generated from the items and the declarative columns.

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

<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/tree_data_grid.rs#L120)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### create_default_element_factory

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

Creates the element factory of the grid when none is set (`CreateDefaultElementFactory`).

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

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

### auto_drag_drop_rows_property

```rust
fn auto_drag_drop_rows_property() -> &'static StyledProperty<bool>
```

Defines the `AutoDragDropRows` property.

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

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

### can_user_resize_columns_property

```rust
fn can_user_resize_columns_property() -> &'static StyledProperty<bool>
```

Defines the `CanUserResizeColumns` property.

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

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

### can_user_sort_columns_property

```rust
fn can_user_sort_columns_property() -> &'static StyledProperty<bool>
```

Defines the `CanUserSortColumns` property.

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

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

### columns_property

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

Defines the `Columns` property.

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

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

### element_factory_property

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

Defines the `ElementFactory` property.

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

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

### rows_property

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

Defines the `Rows` property.

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

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

### scroll_property

```rust
fn scroll_property() -> &'static DirectProperty<TreeDataGrid, Option<Ref<ScrollViewer>>>
```

Defines the `Scroll` property.

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

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

### show_column_headers_property

```rust
fn show_column_headers_property() -> &'static StyledProperty<bool>
```

Defines the `ShowColumnHeaders` property.

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

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

### source_property

```rust
fn source_property() -> &'static DirectProperty<TreeDataGrid, Option<TreeDataGridSourceRef>>
```

Defines the `Source` property.

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

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

### model_property

```rust
fn model_property() -> &'static StyledProperty<Option<TreeDataGridSourceRef>>
```

Defines the `Model` property: the primary, framework-neutral source. The control owns
view state, never this model.

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

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

### presentation_options_property

```rust
fn presentation_options_property() -> &'static StyledProperty<Option<Rc<dyn ITreeDataGridPresentationOptions>>>
```

Defines the `PresentationOptions` property.

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

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

### presentation_property

```rust
fn presentation_property() -> &'static DirectProperty<TreeDataGrid, Option<PresentationRef>>
```

Defines the `Presentation` property.

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

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

### items_source_property

```rust
fn items_source_property() -> &'static StyledProperty<Option<ItemsSource>>
```

Defines the `ItemsSource` property.

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

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

### selection_mode_property

```rust
fn selection_mode_property() -> &'static StyledProperty<TreeDataGridSelectionMode>
```

Defines the `SelectionMode` property.

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

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

### row_drag_started_event

```rust
fn row_drag_started_event() -> &'static RoutedEvent<TreeDataGridRowDragStartedEventArgs>
```

Defines the `RowDragStarted` event.

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

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

### row_drag_over_event

```rust
fn row_drag_over_event() -> &'static RoutedEvent<TreeDataGridRowDragEventArgs>
```

Defines the `RowDragOver` event.

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

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

### row_drop_event

```rust
fn row_drop_event() -> &'static RoutedEvent<TreeDataGridRowDragEventArgs>
```

Defines the `RowDrop` event.

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

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

### TEMPLATE_PARTS

```rust
const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
```

The named parts expected in the control template.

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

<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/tree_data_grid.rs#L301)

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

### new

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



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

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

### auto_drag_drop_rows

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

Whether rows can be dragged and dropped to move them (`AutoDragDropRows`).

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

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

### set_auto_drag_drop_rows

```rust
fn set_auto_drag_drop_rows(self: &Self, value: bool)
```

Sets `auto_drag_drop_rows`.

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

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

### can_user_resize_columns

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

Whether the user can resize the columns (`CanUserResizeColumns`).

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

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

### set_can_user_resize_columns

```rust
fn set_can_user_resize_columns(self: &Self, value: bool)
```

Sets `can_user_resize_columns`.

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

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

### can_user_sort_columns

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

Whether the user can sort by clicking a column header (`CanUserSortColumns`).

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

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

### set_can_user_sort_columns

```rust
fn set_can_user_sort_columns(self: &Self, value: bool)
```

Sets `can_user_sort_columns`.

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

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

### columns

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

The columns presented (`Columns`).

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

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

### element_factory

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

The factory of the rows, cells and column headers (`ElementFactory`); created by
`create_default_element_factory` when
none is set.

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

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

### set_element_factory

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

Sets `element_factory`.

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

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

### rows

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

The rows presented (`Rows`).

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

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

### column_headers_presenter

```rust
fn column_headers_presenter(self: &Self) -> Option<Ref<TreeDataGridColumnHeadersPresenter>>
```

The presenter of the column headers of the template (`PART_ColumnHeadersPresenter`).

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

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

### rows_presenter

```rust
fn rows_presenter(self: &Self) -> Option<Ref<TreeDataGridRowsPresenter>>
```

The presenter of the rows of the template (`PART_RowsPresenter`).

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

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

### scroll

```rust
fn scroll(self: &Self) -> Option<Ref<ScrollViewer>>
```

The scroll viewer of the rows (`Scroll`).

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

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

### show_column_headers

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

Whether the column headers are shown (`ShowColumnHeaders`).

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

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

### set_show_column_headers

```rust
fn set_show_column_headers(self: &Self, value: bool)
```

Sets `show_column_headers`.

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

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

### column_selection

```rust
fn column_selection(self: &Self) -> Option<Rc<dyn crate::selection::IUntypedCellSelection>>
```

The cell selection of the source, if it is one (`ColumnSelection`).

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

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

### row_selection

```rust
fn row_selection(self: &Self) -> Option<Rc<dyn ferroui_treedatagrid_core::selection::ITreeSelectionModel>>
```

The row selection of the source, if it is one (`RowSelection`).

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

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

### source

```rust
fn source(self: &Self) -> Option<TreeDataGridSourceRef>
```

The source shown (`Source`): the explicit source, or the source generated from the items
and declarative columns; `None` while a model is shown.

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

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

### set_source

```rust
fn set_source(self: &Self, value: Option<TreeDataGridSourceRef>)
```

Sets the explicit source (`Source`): it replaces the model.

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

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

### selection_interaction

```rust
fn selection_interaction(self: &Self) -> Option<Rc<dyn ITreeDataGridSelectionInteraction>>
```

The interaction of the selection with the control (`SelectionInteraction`).

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

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

### cell_clearing

```rust
fn cell_clearing(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`CellClearing`: a cell is about to be cleared. Disposing the returned handle unsubscribes.

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

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

### cell_prepared

```rust
fn cell_prepared(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`CellPrepared`: a cell was prepared for display.

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

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

### cell_value_changed

```rust
fn cell_value_changed(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`CellValueChanged`: the value of a cell changed.

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

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

### row_clearing

```rust
fn row_clearing(self: &Self, handler: impl Fn(&TreeDataGridRowEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`RowClearing`: a row is about to be cleared.

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

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

### row_prepared

```rust
fn row_prepared(self: &Self, handler: impl Fn(&TreeDataGridRowEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`RowPrepared`: a row was prepared for display.

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

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

### selection_changing

```rust
fn selection_changing(self: &Self, handler: impl Fn(&CancelEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```

`SelectionChanging`: the selection is about to change; a handler cancels it with
`CancelEventArgs::set_cancel`.

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

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

### row_drag_started

```rust
fn row_drag_started(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragStartedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

`RowDragStarted`: a drag of rows started.

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

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

### row_drag_over

```rust
fn row_drag_over(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

`RowDragOver`: rows are dragged over a row.

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

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

### row_drop

```rust
fn row_drop(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

`RowDrop`: rows are dropped on a row.

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

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

### try_get_cell

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

The cell at `column_index` of the row at `row_index`, if it is realized (`TryGetCell`).

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

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

### try_get_row

```rust
fn try_get_row(self: &Self, row_index: i32) -> Option<Ref<TreeDataGridRow>>
```

The row at `row_index`, if it is realized (`TryGetRow`).

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

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

### try_get_cell_of

```rust
fn try_get_cell_of(self: &Self, element: Option<&Control>) -> Option<Ref<TreeDataGridCell>>
```

The cell that is `element` or contains it (`TryGetCell(Control, out TreeDataGridCell)`).

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

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

### try_get_row_of

```rust
fn try_get_row_of(self: &Self, element: Option<&Control>) -> Option<Ref<TreeDataGridRow>>
```

The row that is `element` or contains it (`TryGetRow(Control, out TreeDataGridRow)`).

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

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

### try_get_row_model

```rust
fn try_get_row_model<M: 'static>(self: &Self, element: &Control) -> Option<Rc<M>>
```

The model of the row that is `element` or contains it, if it is a model of type `M`
(`TryGetRowModel<TModel>`).

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

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

### query_cancel_selection

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

Asks the `SelectionChanging` handlers whether the selection may change; true when one
cancels it (`QueryCancelSelection`).

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

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

### raise_cell_clearing

```rust
fn raise_cell_clearing(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
```

Raises `CellClearing` (`RaiseCellClearing`).

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

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

### raise_cell_prepared

```rust
fn raise_cell_prepared(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
```

Raises `CellPrepared` (`RaiseCellPrepared`).

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

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

### raise_cell_value_changed

```rust
fn raise_cell_value_changed(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
```

Raises `CellValueChanged` (`RaiseCellValueChanged`).

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

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

### raise_row_clearing

```rust
fn raise_row_clearing(self: &Self, row: &TreeDataGridRow, row_index: i32)
```

Raises `RowClearing` (`RaiseRowClearing`).

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

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

### raise_row_prepared

```rust
fn raise_row_prepared(self: &Self, row: &TreeDataGridRow, row_index: i32)
```

Raises `RowPrepared` (`RaiseRowPrepared`).

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

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

### raise_row_drag_started

```rust
fn raise_row_drag_started(self: &Self, trigger: &PointerPressedEventArgs)
```

Starts a drag of the selected rows after the press `trigger` (`RaiseRowDragStarted`):
raises `RowDragStarted`, then starts the drag and drop operation with the effects allowed.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TreeDataGridImplExt`](/docs/0.5.0/api/ferroui-controls-treedatagrid/trait-treedatagridimplext/)
- `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<TreeDataGrid>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`TreeDataGridImpl`](/docs/0.5.0/api/ferroui-controls-treedatagrid/trait-treedatagridimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)

## Availability

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