Blazor Tree Grid Example - Sorting
This sample demonstrates the Tree Grid multi sorting feature. To sort two or more columns, hold the CTRL key and click on the column header.
2Order Name Sorted in ascending order | 1Category Sorted in ascending order | Start Date Press Enter to sort | Shipped Date Press Enter to sort | Units Press Enter to sort | Price Press Enter to sort |
|---|
Order 3 | Crystals | 9/10/2021 | 9/20/2021 | 1944 | $21,233 |
Glass beads | Solid crystals | 5/22/2021 | 3/22/2021 | 254 | $4,064 |
Lead glassware | Solid crystals | 2/7/2021 | 2/14/2021 | 542 | $3,252 |
Pharmaceutical glass | Solid crystals | 4/19/2021 | 4/26/2021 | 324 | $3,564 |
Yellowfin Tuna | Frozen seafood | 3/5/2021 | 10/5/2021 | 324 | $2,592 |
Order 2 | Products | 1/10/2021 | 1/16/2021 | 1944 | $21,233 |
Blue Veined Cheese | Dairy | 7/10/2021 | 7/17/2021 | 370 | $5,550 |
Butter | Dairy | 9/18/2021 | 9/25/2021 | 413 | $3,717 |
Fresh Cheese | Dairy | 6/8/2021 | 6/15/2021 | 323 | $3,876 |
Tilapias | Frozen seafood | 2/5/2021 | 2/12/2021 | 278 | $4,170 |
White Shrimp | Frozen seafood | 5/22/2021 | 5/29/2021 | 560 | $3,920 |
Order 1 | Seafood | 3/2/2021 | 9/2/2021 | 1395 | $65,565 |
Herrings | Frozen seafood | 8/5/2021 | 5/15/2021 | 488 | $5,368 |
Mackerel | Frozen seafood | 3/3/2021 | 10/3/2021 | 235 | $2,820 |
Preserved Olives | Edible | 6/10/2021 | 6/17/2021 | 125 | $1,125 |
Sweet corn | Edible | 7/12/2021 | 7/19/2021 | 223 | $1,561 |
Sorting can be enabled by using the AllowSorting property.
By default, the multi-sorting feature is enabled in the Tree Grid. To sort multiple columns, hold the CTRL key and then click on the column header. To clear the sort for a column, hold the SHIFT key and then click on the column header.
More information on sorting can be found in this documentation section.