Skip to content

Fix null reference in DataGridRowGroupHeader.OnDetachedFromLogicalTree - #251

Merged
MrJul merged 1 commit into
AvaloniaUI:masterfrom
zrt2399:fix_issue_250
Jul 3, 2026
Merged

Fix null reference in DataGridRowGroupHeader.OnDetachedFromLogicalTree#251
MrJul merged 1 commit into
AvaloniaUI:masterfrom
zrt2399:fix_issue_250

Conversation

@zrt2399

@zrt2399 zrt2399 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes a NullReferenceException that can occur when switching tabs containing a grouped DataGrid.

DataGridRowGroupHeader.OnDetachedFromLogicalTree now checks that OwningGrid and RowGroupInfo.CollectionViewGroup are available before removing the collection view group reference.

Fixes #250

@zrt2399 zrt2399 mentioned this pull request Jul 1, 2026

@MrJul MrJul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MrJul
MrJul merged commit c560a39 into AvaloniaUI:master Jul 3, 2026
1 check passed
This was referenced Jul 9, 2026
This was referenced Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataGridRowGroupHeader.OnDetachedFromLogicalTree throws NullReferenceException when switching tabs

2 participants