Skip to content

QuickGrid: Adds Multi Column Sorting #62604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

los93sol
Copy link

@los93sol los93sol commented Jul 8, 2025

QuickGrid: Adds Multi Column Sorting

Description

This pull request adds multi column sorting capabilities to QuickGrid. AddUpdateSortByColumnAsync can be called by columns to append or change the sort direction of an existing sorted column. For EF implementations multi column sorting is handled automatically. The existing SortByColumnAsync method clears all other columns and simply flips the direction of the column that was clicked. This enables users to, for example, specify ctrl+click appends the column and a normal click clears other columns and allows for things like ColumnOptions to be used so the default single column sorting functionality is maintained, but the underlying capability is now included in the box to support multiple column sorting.

Additionally, this PR exposes the SortColumns so individual columns can easily apply this logic and benefit from additional functionality like making it trivial to swap an icon out based on it's current sort state independent of the aria tags on the tr itself since that's much more difficult to get at in those cases.

Fixes #62494

-Adds Multi column sorting capability
-Exposes SortColumns so that individual columns can easily apply their own logic based on whether or not they're currently being sorted by.  Use cases like swapping an icon out in markup, changing available options, etc.
@los93sol los93sol requested a review from a team as a code owner July 8, 2025 16:03
@github-actions github-actions bot added the area-blazor Includes: Blazor, Razor Components label Jul 8, 2025
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jul 8, 2025
Copy link
Contributor

Thanks for your PR, @@los93sol. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@los93sol los93sol requested review from tdykstra and a team as code owners July 8, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[QuickGrid] Sort enhancements
3 participants