Blazor Tree Grid Example - Aggregates
ID Press Enter to sort. Press Alt Down to open filter Menu | Name Press Enter to sort. Press Alt Down to open filter Menu | Category Press Enter to sort. Press Alt Down to open filter Menu | Product Press Enter to sort. Press Alt Down to open filter Menu | Units Press Enter to sort. Press Alt Down to open filter Menu | Unit Price Press Enter to sort. Press Alt Down to open filter Menu | Sales Press Enter to sort. Press Alt Down to open filter Menu | Profit Press Enter to sort. Press Alt Down to open filter Menu | Margin Press Enter to sort. Press Alt Down to open filter Menu |
|---|
| 1 | North America | 5270 | $23.00 | $15,227 | $3,830 | 25.2% | ||
| 2 | Store - Seattle | 2670 | $12.30 | $8,397 | $2,320 | 27.6% | ||
| 4 | Category - Beverages | Beverages | 1460 | $7.75 | $5,725 | $1,600 | 27.9% | |
| 5 | Latte | Beverages | Latte | 820 | $4.25 | $3,485 | $980 | 28.1% |
| 6 | Espresso | Beverages | Espresso | 640 | $3.50 | $2,240 | $620 | 27.7% |
| 7 | Category - Snacks | Snacks | 1210 | $4.55 | $2,672 | $720 | 26.9% | |
| 8 | Blueberry Muffin | Snacks | Blueberry Muffin | 520 | $2.75 | $1,430 | $390 | 27.3% |
| 9 | Chocolate Cookie | Snacks | Chocolate Cookie | 690 | $1.80 | $1,242 | $330 | 26.6% |
| 3 | Store - Chicago | 2600 | $10.70 | $6,830 | $1,510 | 22.1% | ||
| 10 | Category - Beverages | Beverages | 1270 | $7.00 | $4,520 | $1,180 | 26.1% | |
| 11 | Cappuccino | Beverages | Cappuccino | 710 | $4.00 | $2,840 | $760 | 26.8% |
| 12 | Iced Coffee | Beverages | Iced Coffee | 560 | $3.00 | $1,680 | $420 | 25.0% |
| 13 | Category - Bakery | Bakery | 1330 | $3.70 | $2,310 | $330 | 14.3% | |
| 14 | Bagel | Bakery | Bagel | 880 | $1.50 | $1,320 | $210 | 15.9% |
| 15 | Croissant | Bakery | Croissant | 450 | $2.20 | $990 | $120 | 12.1% |
| 21 | Europe | 4440 | $21.10 | $11,447 | $2,342 | 20.5% | ||
| 22 | Store - Berlin | 2260 | $11.10 | $6,142 | $1,290 | 21.0% | ||
| 24 | Category - Beverages | Beverages | 1140 | $7.00 | $3,972 | $980 | 24.7% | |
| 25 | Americano | Beverages | Americano | 600 | $3.20 | $1,920 | $480 | 25.0% |
| 26 | Mocha | Beverages | Mocha | 540 | $3.80 | $2,052 | $500 | 24.4% |
| 27 | Category - Snacks | Snacks | 1120 | $4.10 | $2,170 | $310 | 14.3% | |
| 28 | Pretzel | Snacks | Pretzel | 700 | $1.60 | $1,120 | $160 | 14.3% |
| 29 | Apple Strudel | Snacks | Apple Strudel | 420 | $2.50 | $1,050 | $150 | 14.3% |
| 23 | Store - Madrid | 2180 | $10.00 | $5,305 | $1,052 | 19.8% | ||
| 30 | Category - Beverages | Beverages | 990 | $6.70 | $3,324 | $780 | 23.5% | |
| 31 | Cortado | Beverages | Cortado | 480 | $3.10 | $1,488 | $360 | 24.2% |
| 32 | Iced Latte | Beverages | Iced Latte | 510 | $3.60 | $1,836 | $420 | 22.9% |
| 33 | Category - Bakery | Bakery | 1190 | $3.30 | $1,981 | $272 | 13.7% | |
| 34 | Magdalena | Bakery | Magdalena | 560 | $1.40 | $784 | $112 | 14.3% |
| 35 | Churros | Bakery | Churros | 630 | $1.90 | $1,197 | $160 | 13.4% |
| 40 | Special - Promotions | 300 | $2.00 | $600 | ($150) | -25.0% | ||
| 41 | Store - Clearance | 300 | $2.00 | $600 | ($150) | -25.0% | ||
| 42 | Category - Seasonal | Seasonal | 300 | $2.00 | $600 | ($150) | -25.0% | |
| 43 | Discounted Beans | Seasonal | Discounted Beans | 300 | $2.00 | $600 | ($150) | -25.0% |
This sample demonstrates aggregate functionality in the Tree Grid. Aggregates are displayed in the footer to summarize key metrics such as total, average, and count.
Configure aggregates using TreeGridAggregateColumn within the TreeGridAggregates collection.
Supported aggregate types:
SumAverageMinMaxCountTrueCountFalseCount
This demo uses FooterTemplate to show: Total Sales and Total Profit (Sum), Average Unit Price (Average), and Item Count (Count). Aggregates appear at the bottom and include child summaries via ShowChildSummary.
Learn more in the aggregates documentation.