Data Grid Hierarchy

Hierarchical tree data for BbDataGrid. Supports nested object graphs, self-referencing flat data, expand/collapse, cascading selection, child pagination, lazy loading, and filtering with ancestor preservation.

Nested Data

Use ChildrenSelector to define a nested hierarchy from object graphs. Each item returns its children directly. ChildPageSize paginates children within each parent node, and ShowExpandAll adds a toggle in the hierarchy column header to expand or collapse all nodes at once.
Loading example…

Self-Referencing Data

Use ParentValueSelector with a flat list where each item references its parent by ID. The grid reconstructs the tree automatically. DefaultExpandDepth="1" auto-expands only root nodes on load. ChildPageSize paginates children within each parent. Combine with BbFilterBuilder and ItemFilter for hierarchy-aware filtering — matching items and their ancestors are preserved. Use HierarchyFilterMode to control whether descendants of matches are also shown.
Loading example…

Cascading Selection

Set HierarchySelectionMode="HierarchySelectionMode.Cascade" with SelectionMode="DataTableSelectionMode.Multiple" to propagate selection to all descendants. Selecting a folder automatically selects every file inside it. The CellTemplate renders file-type icons alongside file names.
Loading example…