Skip to content

Commit

Permalink
fix(DataGrid): not displaying cells from last columns when resized fr…
Browse files Browse the repository at this point in the history
…om scrolled state
  • Loading branch information
Xiaoy312 committed Nov 14, 2024
1 parent d6d5f8b commit 9d63dc2
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,14 @@ private bool ComputeDisplayedColumns()
_horizontalOffset -= GetEdgedColumnWidth(dataGridColumn);
dataGridColumn = this.ColumnsInternal.GetPreviousVisibleScrollingColumn(dataGridColumn);
}

if (_horizontalOffset == 0 && cx < displayWidth)
{
// if the columns have been scrolled, and all visible columns are fully rendered in the available space,
// then HorizontalAdjustment needs to be updated so that DataGridCellsPresenter.ShouldDisplayCell
// don't hide columns based on the old value.
HorizontalAdjustment = displayWidth - cx;
}
}

// third try to partially scroll in first scrolled off column
Expand Down

0 comments on commit 9d63dc2

Please sign in to comment.