TreeDataGrid uses explicit column/row/cell model abstractions instead of directly binding visuals to raw data.
Main contracts:
IColumn and IColumn<TModel>IColumnsBuilt-in column types:
TextColumn<TModel, TValue>CheckBoxColumn<TModel>TemplateColumn<TModel>HierarchicalExpanderColumn<TModel>Column responsibilities:
CreateCell)GetComparison)Width, ActualWidth)Main contracts:
IRow and IRow<TModel>IRowsRow responsibilities:
IndexPath) and visible indexes (int)Hierarchical row models additionally track:
Main contracts:
ICellITextCellIExpanderCellCell responsibilities:
CanEdit, EditGestures)Common options come from ColumnOptions<TModel>:
BeginEditGestures)Specialized options:
TextColumnOptions<TModel>: format, wrapping, trimming, alignment, text-searchTemplateColumnOptions<TModel>: text-search selectorThe UI does not create a permanent visual for every row/cell.
CellPrepared, CellClearing, RowPrepared, RowClearing) let you integrate custom behavior safely.Treat visuals as ephemeral; treat source/model state as canonical.
Typically app code uses:
FlatTreeDataGridSource, HierarchicalTreeDataGridSource)Infrastructure-level contracts are still public and useful for advanced customization:
IUpdateColumnLayoutFeature 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.