HierarchicalExpanderColumn<TModel> wraps another column and adds tree expansion affordances.
Use it only with HierarchicalTreeDataGridSource<TModel>.
new HierarchicalExpanderColumn<Person>(
inner: new TextColumn<Person, string>("Name", x => x.Name),
childSelector: x => x.Children)
Parameters:
inner: how the column content is renderedchildSelector: returns children for each modelYou can provide optional selectors to optimize behavior and persist expansion state.
new HierarchicalExpanderColumn<FileNode>(
inner: new TemplateColumn<FileNode>("Name", "FileNameCell", "FileNameEditCell"),
childSelector: x => x.Children,
hasChildrenSelector: x => x.HasChildren,
isExpandedSelector: x => x.IsExpanded)
hasChildrenSelector avoids expensive child materialization for expander visibility checks.
isExpandedSelector syncs UI expanded state with model property.
The expander column delegates width and sorting behavior to its inner column.
That means:
inner.GetComparison(...)TemplateColumn as inner column for rich file/tree visuals.hasChildrenSelector when child loading is lazy or expensive.isExpandedSelector if expanded state should persist across refresh/rebind.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.