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

(cherry picked from commit 9d63dc2)
  • Loading branch information
Xiaoy312 authored and mergify[bot] committed Nov 18, 2024
1 parent 7b3d97d commit 5b25255
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 5b25255

Please sign in to comment.