Skip to content

Document page index handling in QuickGrid#37020

Open
guardrex wants to merge 2 commits intomainfrom
guardrex-patch-3
Open

Document page index handling in QuickGrid#37020
guardrex wants to merge 2 commits intomainfrom
guardrex-patch-3

Conversation

@guardrex
Copy link
Copy Markdown
Collaborator

@guardrex guardrex commented Apr 16, 2026

Fixes #37019

Ilona ... A few years ago, a dev asked how to make the manually-built grid of an old Blazor Server EF Core sample return the user to the grid at the scroll position† where they left. [IIRC, QuickGrid had just come out at the time. The sample that we were discussing didn't use it. We don't even have that sample anymore.]

What I'd like to do in this area is cover page index management for QuickGrid. At the time, I was too busy to flesh out a page index example, but I reached it for work today. As usual, I want to provide a fully working, cut-'n-paste example. How does this look to you?

†BTW ... AFAIK, scroll position isn't something that can be tracked/set with a QuickGrid. I know that such a grid can be built that would do something like that, but I don't think that the built-in QuickGrid component has such a feature baked into it. If I'm wrong about that ... if there would be some way to preserve scroll position for coming back from a details page, please let me know. 👂


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/components/quickgrid.md aspnetcore/blazor/components/quickgrid

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation and a cut-and-paste sample showing how to preserve and restore a QuickGrid page index when navigating to a details page and back.

Changes:

  • Document PaginationState.CurrentPageIndex and PaginationState.SetCurrentPageIndexAsync for saving/restoring paging state.
  • Add Details.razor and Characters.razor example snippets using query string parameters to round-trip the page index.

Comment thread aspnetcore/blazor/components/quickgrid.md Outdated
Comment thread aspnetcore/blazor/components/quickgrid.md Outdated
Comment thread aspnetcore/blazor/components/quickgrid.md
Comment thread aspnetcore/blazor/components/quickgrid.md
Comment thread aspnetcore/blazor/components/quickgrid.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Luke Latham <1622880+guardrex@users.noreply.github.com>
@guardrex guardrex requested a review from ilonatommy April 16, 2026 23:46
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.

Add example of a details page that returns to the viewed page of a paged QG component

2 participants