TreeDataGrid is an Avalonia control that combines:
Use TreeDataGrid when you need column-based presentation with optional parent/child data and large datasets.
By the end of Getting Started, you will have:
TreeDataGrid in XAMLFlatTreeDataGridSource<TModel> or HierarchicalTreeDataGridSource<TModel>TextColumn, TemplateColumn, CheckBoxColumn, HierarchicalExpanderColumn)Choose your source type first:
FlatTreeDataGridSource<TModel>: table-like data, no childrenHierarchicalTreeDataGridSource<TModel>: rows may contain nested childrenYou can still use multiple columns in both modes.
TreeDataGrid separates what to show from how to show it:
ITreeDataGridSource) defines rows, columns, selection, sortingTreeDataGrid control realizes models into visual rows/cells with virtualizationThis keeps view models strongly typed and UI behavior predictable.
Feature behavior differs from expectations
Cause: one or more options in this scenario are configured differently (source type, column options, sort/selection/edit state).
Fix: compare your setup with the snippet in this article and verify runtime values on Source, Columns, and Selection.
Data changes are not visible in UI
Cause: model or collection notifications are missing, or a replaced collection/source is not re-bound.
Fix: ensure INotifyPropertyChanged/INotifyCollectionChanged flow is active and reassign Source after replacing underlying collections.