Setup: a FluentDataGrid with pinned columns (Pin="DataGridColumnPin.Start" / End) and RowDetails whose content is
another FluentDataGrid that also has pinned columns (master-detail).
Actual: once a detail is open, the pinned cells of the master grid are shifted by their own width (start column moved right,
end column moved left), and header cells of the nested grid overlap.
Cause: UpdatePinnedColumnOffsets (Components/DataGrid/FluentDataGrid.razor.js) uses
gridElement.querySelectorAll("th[col-pinned='start']") / 'end', which also returns the pinned headers of the nested grid, then
applyOffset writes the offset on every [col-index="N"] cell of the subtree — master and nested cells share col-index values.
The unpinned cells of the nested grid that share a col-index also receive inset-inline-* (visible on the sticky header row).
Suggested fix: only consider the grid's own header row and rows, e.g. gridElement.tHead.rows[0].cells and the cells of
gridElement.tHead.rows / gridElement.tBodies[n].rows instead of a subtree query.
(Workaround in our app: a MutationObserver that recomputes the offsets per table.)
Environment: Microsoft.FluentUI.AspNetCore.Components 5.0.0 / Microsoft.FluentUI.AspNetCore.McpServer 5.0.0, Blazor Server, net9.0, Chrome, Windows 11. Found while migrating an application from 4.14.4 to 5.0.0.
Setup: a
FluentDataGridwith pinned columns (Pin="DataGridColumnPin.Start"/End) andRowDetailswhose content isanother
FluentDataGridthat also has pinned columns (master-detail).Actual: once a detail is open, the pinned cells of the master grid are shifted by their own width (start column moved right,
end column moved left), and header cells of the nested grid overlap.
Cause:
UpdatePinnedColumnOffsets(Components/DataGrid/FluentDataGrid.razor.js) usesgridElement.querySelectorAll("th[col-pinned='start']")/'end', which also returns the pinned headers of the nested grid, thenapplyOffsetwrites the offset on every[col-index="N"]cell of the subtree — master and nested cells share col-index values.The unpinned cells of the nested grid that share a col-index also receive
inset-inline-*(visible on the sticky header row).Suggested fix: only consider the grid's own header row and rows, e.g.
gridElement.tHead.rows[0].cellsand the cells ofgridElement.tHead.rows/gridElement.tBodies[n].rowsinstead of a subtree query.(Workaround in our app: a MutationObserver that recomputes the offsets per table.)
Environment: Microsoft.FluentUI.AspNetCore.Components 5.0.0 / Microsoft.FluentUI.AspNetCore.McpServer 5.0.0, Blazor Server, net9.0, Chrome, Windows 11. Found while migrating an application from 4.14.4 to 5.0.0.