Blazor DataGrid Example - Multi-Column Sorting
Order ID Press Enter to sort | 1Customer ID Sorted in ascending order | 2 Order Date Sorted in descending order | Freight Press Enter to sort |
|---|
| No records to display |
This sample demonstrates the DataGrid multi-sorting feature for organizing data by multiple columns.
The Blazor DataGrid sorting feature enables you to organize data in a specific order. To enable sorting, set the AllowSorting property to true.
Single Column Sorting:
- Click any column header to sort by that column
- Click again to toggle between ascending and descending order
Multi-Column Sorting:
- Multi-sorting is enabled by default in the DataGrid
- Hold Ctrl and click column headers to sort by multiple columns
- The sort order is applied based on the sequence of clicks
- Hold Shift and click a column header to clear sorting for that column
In this demo, simply click column headers to enable sorting. Use Ctrl+Click to add additional sort columns and organize your data by multiple criteria simultaneously.
For more detailed information about multi-column sorting, refer to the multi-column sorting documentation.