feat: add DataGrid virtualization options - #5193
Open
James Newton-King (JamesNK) wants to merge 8 commits into
Open
feat: add DataGrid virtualization options#5193James Newton-King (JamesNK) wants to merge 8 commits into
James Newton-King (JamesNK) wants to merge 8 commits into
Conversation
James Newton-King (JamesNK)
requested review from
Denis Voituron (dvoituron) and
Vincent Baaij (vnbaaij)
as code owners
August 23, 2026 09:13
Copilot started reviewing on behalf of
James Newton-King (JamesNK)
August 23, 2026 09:13
View session
James Newton-King (JamesNK)
force-pushed
the
feat/datagrid-virtualization-options
branch
from
August 23, 2026 09:14
a931271 to
5cf9434
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new .NET-version-specific virtualization controls to FluentDataGrid (forwarded to its internal Virtualize component), and updates CI/build configuration to include net11.0 builds/tests.
Changes:
- Exposes virtualization options (
MaxItemCountfor net9+;InitialItemIndex,AnchorMode,ItemComparer,ScrollToItemAsyncfor net11+) and forwards them to the underlyingVirtualize. - Adds/updates DataGrid and Wizard tests (including net11-only coverage) and updates DataGrid virtualization documentation.
- Expands multi-targeting and CI pipelines/workflows to build/test with
net11.0(preview SDK), plus minor net11 compatibility fixes.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Core/Components/Wizard/FluentWizardAdvancedTests.razor | Suppresses obsolete warning around EditContext.Validate() usage in tests. |
| tests/Core/Components/DataGrid/FluentDataGridTests.razor | Adds tests for new virtualization parameters and ScrollToItemAsync behavior. |
| src/Tools/McpServer/Services/MigrationService.cs | Uses StartsWith(..., StringComparison.Ordinal) to satisfy string-comparison diagnostics. |
| src/Tools/McpServer/Services/DocumentationService.cs | Uses StartsWith(..., StringComparison.Ordinal) to satisfy string-comparison diagnostics. |
| src/Core/Components/Wizard/FluentWizardStep.razor.cs | Suppresses CS0618 for EditContext.Validate() usage and documents follow-up to adopt async validation later. |
| src/Core/Components/Wizard/FluentWizard.razor.cs | Removes redundant StateHasChanged() calls after next/previous navigation. |
| src/Core/Components/DataGrid/FluentDataGrid.razor.cs | Adds new public virtualization parameters and net11 ScrollToItemAsync, plus tuple comparer adaptation. |
| src/Core/Components/DataGrid/FluentDataGrid.razor | Switches to a RenderTreeBuilder-based Virtualize render to conditionally forward new parameters. |
| examples/Demo/FluentUI.Demo.Client/Documentation/Components/DataGrid/Pages/DataGridVirtualizePage.md | Documents net11 positioning/anchoring APIs and sample usage. |
| eng/pipelines/build-core-lib.yml | Installs .NET 11 preview SDK for Azure Pipelines builds. |
| eng/pipelines/build-all-lib.yml | Installs .NET 11 preview SDK for Azure Pipelines builds. |
| Directory.Build.props | Adds net11.0 to Release multi-targeting and suppresses BL0016 for net11. |
| .github/workflows/build-core-lib.yml | Adds .NET 11 SDK setup and a net11 test run in GitHub Actions. |
| _ListOutdatedDependencies.ps1 | Includes net11.0 in the dependency-audit loop. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
James Newton-King (JamesNK)
force-pushed
the
feat/datagrid-virtualization-options
branch
3 times, most recently
from
August 23, 2026 09:44
b949ea9 to
16142e0
Compare
Collaborator
|
This is great stuff! |
James Newton-King (JamesNK)
force-pushed
the
feat/datagrid-virtualization-options
branch
from
August 23, 2026 13:27
16142e0 to
e30f245
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Vincent Baaij (vnbaaij)
approved these changes
Aug 25, 2026
Vincent Baaij (vnbaaij)
enabled auto-merge (squash)
August 25, 2026 07:29
Denis Voituron (dvoituron)
approved these changes
Aug 25, 2026
auto-merge was automatically disabled
August 28, 2026 04:19
Head branch was pushed to by a user without write access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
📖 Description
Adds virtualization controls to
FluentDataGridand forwards them to its internalVirtualizecomponent.MaxItemCountfor .NET 9 and later.InitialItemIndex,AnchorMode,ItemComparer, andScrollToItemAsync.ItemComparerto the grid's internal row-index/item tuple while comparing item identity only.🎫 Issues
Closes #5158
👩💻 Reviewer Notes
The .NET 11 APIs are conditionally available under
NET11_0_OR_GREATER.AnchorModeandItemComparerare stable APIs in .NET 11 RC1 and are not annotated or documented as experimental.The public item comparer is wrapped because the internal virtualizer operates on
(rowIndex, item)tuples. The wrapper intentionally ignores row indexes and reads the current comparer so parameter updates take effect.📑 Test Plan
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj --configuration Release(zero warnings/errors)dotnet test tests/Core/Components.Tests.csproj --configuration Release -p:ExampleNetVersion=net11.0(3,856 passed)dotnet test tests/Core/Components.Tests.csproj --configuration Release --framework net9.0(3,851 passed)✅ Checklist
General
Component-specific
MCP Server
⏭ Next Steps
Update the .NET 11 SDK and package pins when the next public .NET 11 release is published.