Logo FluentUI

TreeDataGridModel QML Type

Tree model for hierarchical data in a DataGrid. More...

Import Statement: import FluentUI.impl 1.0

Properties

Signals

Methods

Detailed Description

The TreeDataGridModel type provides a hierarchical tree data model for use with the DataGrid control. It supports expanding and collapsing tree nodes, and exposes flattened display data for rendering.

Property Documentation

count : int

This read-only property holds the total number of visible (expanded) rows in the tree model.

displayData : list

This read-only property holds the flattened list of data rows currently visible in the tree, reflecting expand and collapse state.

sourceData : list

The source data list containing the root-level tree nodes.

Signal Documentation

void countChanged()

Emitted when the number of visible rows in the tree model changes, typically due to expand or collapse operations.

Note: The corresponding handler is onCountChanged.

Method Documentation

void clear()

Removes all nodes from the tree model.

void collapse(int rowIndex)

Collapses the tree node at the specified visible rowIndex, hiding its children.

void expand(int rowIndex)

Expands the tree node at the specified visible rowIndex, revealing its children.

var get(int rowIndex)

Returns the data at the specified visible rowIndex.

void selectRange(var selectionModel, int startRow, int endRow)

Selects the range of visible rows from startRow to endRow using the given selectionModel.