Tree grid

TreeGridControl

A flat list with Id and ParentId columns, shown as a collapsible hierarchy.

Overview

TreeGridControl builds the hierarchy from two property names on a flat list: IdMapping names the key and ParentIdMapping the parent key, null or empty for a root. TreatAsParent marks rows as expandable even before their children are in the list, TreeColumnIndex picks the column that carries the indentation and icons, NodeExpandIconStyle is PlusMinus or Triangle, EnableCollapseAll starts with every node collapsed, and ToggleOnRowClick="false" limits toggling to the icon. Expanded and Collapsed report the node and its level; ExpandAllAsync and CollapseAllAsync do the same from code.

Examples

#Divisions and their phases

Each division is a root row and its phases are children, all in one flat list. Click a plus to open a division, or use Expand all. Change the size to rebuild the list with more divisions and phases; the line under the grid counts the rows the grid received and names the last node you opened or closed.

Example
Razor
C#
Division and phasePhasesBudget

50 rows: 10 divisions with 4 phases each

Documentation

TreeGridControl (92 parameters), TreeGridColumn and TreeNodeEventArgs are still to be written up from Grid/TreeGridControl.razor.cs and Grid/TreeGridColumn.cs.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.