Grouping & totals

GridControl

Group rows by any column and show sums, counts and averages per group.

Overview

Grouping lets users of a Blazor GridControl split a long list into groups by any column, with sums, counts and averages per group. Use it on rate cards, cost lines or orders where the question is how much per supplier or per season; users regroup by dragging a column header into the group bar. Turn on AllowGrouping, set GroupColumns to open the grid grouped, and list caption, group-footer and grid-footer totals in AggregateRows.

Examples

#Rate card grouped by category

Drag Destination into the group bar to regroup a rate card that opens grouped by Category; each caption shows the average rate and line count.

Category ×
CategoryCode Description Supplier Destination Unit Rate Bookable
−Accommodationavg $266.05(17 lines)
RC-1004Double room with breakfastHotel Lisbon CentralLisbonnight$254.62True
RC-1005Twin room, room onlyHotel Lisbon CentralLisbonnight$98.77True
RC-1006Suite with breakfastHotel Lisbon CentralLisbonnight$387.99True
RC-1009Double room with breakfastHotel Amalfi CentralAmalfinight$114.36True
RC-1010Twin room, room onlyHotel Amalfi CentralAmalfinight$160.75False
RC-1012Double room with breakfastHotel Santorini CentralSantorininight$243.15True
RC-1013Twin room, room onlyHotel Santorini CentralSantorininight$186.53True
RC-1014Suite with breakfastHotel Santorini CentralSantorininight$372.19True
RC-1015Double room with breakfastHotel Kyoto CentralKyotonight$217.03True
RC-1016Twin room, room onlyHotel Kyoto CentralKyotonight$130.71True
RC-1017Suite with breakfastHotel Kyoto CentralKyotonight$496.51True
RC-1022Twin room, room onlyHotel Hoi An CentralHoi Annight$202.30True
RC-1023Suite with breakfastHotel Hoi An CentralHoi Annight$535.31True
RC-1029Suite with breakfastHotel Cape Town CentralCape Townnight$482.20False
RC-1058Double room with breakfastHotel Banff CentralBanffnight$313.01True
RC-1067Double room with breakfastHotel Patagonia CentralPatagonianight$226.05True
RC-1068Twin room, room onlyHotel Patagonia CentralPatagonianight$101.38True
−Experiencesavg $96.45(15 lines)
RC-1018Old town walking tourKyoto WalksKyotopax$41.85True
RC-1019Full-day excursion with lunchKyoto Day ToursKyotopax$136.63True
RC-1020Cooking class with market visitTaste of KyotoKyotopax$112.52True
RC-1024Old town walking tourHoi An WalksHoi Anpax$42.04False
RC-1025Full-day excursion with lunchHoi An Day ToursHoi Anpax$104.55True
RC-1026Cooking class with market visitTaste of Hoi AnHoi Anpax$108.12True
RC-1030Old town walking tourCape Town WalksCape Townpax$29.28True
RC-1031Full-day excursion with lunchCape Town Day ToursCape Townpax$96.07True
RC-1032Cooking class with market visitTaste of Cape TownCape Townpax$79.79True
RC-1036Old town walking tourMarrakech WalksMarrakechpax$28.81True
RC-1037Full-day excursion with lunchMarrakech Day ToursMarrakechpax$117.71True
RC-1038Cooking class with market visitTaste of MarrakechMarrakechpax$78.62True
RC-1041Full-day excursion with lunchReykjavik Day ToursReykjavikpax$169.86True
RC-1042Cooking class with market visitTaste of ReykjavikReykjavikpax$159.85True
RC-1046Cooking class with market visitTaste of VancouverVancouverpax$141.01True
−Servicesavg $52.47(20 lines)
RC-1021Travel insurance, comprehensiveRainy Day Travel CoverKyotopax$76.10True
RC-1027Travel insurance, comprehensiveRainy Day Travel CoverHoi Anpax$55.65True
RC-1028Booking feeRazor Sharp Getaways, head officeHoi Anbooking$54.98True
RC-1033Travel insurance, comprehensiveRainy Day Travel CoverCape Townpax$56.06False
RC-1034Booking feeRazor Sharp Getaways, head officeCape Townbooking$57.52True
RC-1035Documents and deliveryRazor Sharp Getaways, head officeCape Townbooking$25.54True
RC-1039Travel insurance, comprehensiveRainy Day Travel CoverMarrakechpax$38.53True
RC-1040Booking feeRazor Sharp Getaways, head officeMarrakechbooking$43.46True
RC-1043Travel insurance, comprehensiveRainy Day Travel CoverReykjavikpax$98.87True
RC-1044Booking feeRazor Sharp Getaways, head officeReykjavikbooking$74.13True
RC-1045Documents and deliveryRazor Sharp Getaways, head officeReykjavikbooking$25.93True
RC-1047Travel insurance, comprehensiveRainy Day Travel CoverVancouverpax$73.68True
RC-1048Booking feeRazor Sharp Getaways, head officeVancouverbooking$71.40True
RC-1049Documents and deliveryRazor Sharp Getaways, head officeVancouverbooking$29.69False
RC-1052Travel insurance, comprehensiveRainy Day Travel CoverBanffpax$71.90True
RC-1053Booking feeRazor Sharp Getaways, head officeBanffbooking$59.67True
RC-1054Documents and deliveryRazor Sharp Getaways, head officeBanffbooking$26.79True
RC-1059Booking feeRazor Sharp Getaways, head officeQueenstownbooking$62.86True
RC-1060Documents and deliveryRazor Sharp Getaways, head officeQueenstownbooking$22.63True
RC-1063Documents and deliveryRazor Sharp Getaways, head officePatagoniabooking$24.07True
−Transportavg $286.49(16 lines)
RC-1001Return flights, economyOverhead Bin AirwaysLisbonpax$531.63True
RC-1002Airport to hotel, private carLisbon Airport TransfersLisbontrip$59.98False
RC-1003Day-trip bus with driverLisbon Rail & BusLisbonday$248.74True
RC-1007Airport to hotel, private carAmalfi Airport TransfersAmalfitrip$48.68True
RC-1008Day-trip bus with driverAmalfi Rail & BusAmalfiday$165.78False
RC-1011Day-trip bus with driverSantorini Rail & BusSantoriniday$200.38True
RC-1050Return flights, economyOverhead Bin AirwaysVancouverpax$611.77True
RC-1051Airport to hotel, private carVancouver Airport TransfersVancouvertrip$92.51True
RC-1055Return flights, economyOverhead Bin AirwaysBanffpax$620.27True
RC-1056Airport to hotel, private carBanff Airport TransfersBanfftrip$69.13True
RC-1057Day-trip bus with driverBanff Rail & BusBanffday$290.41True
RC-1061Return flights, economyOverhead Bin AirwaysQueenstownpax$823.65True
RC-1062Airport to hotel, private carQueenstown Airport TransfersQueenstowntrip$63.40True
RC-1064Return flights, economyOverhead Bin AirwaysPatagoniapax$552.40True
RC-1065Airport to hotel, private carPatagonia Airport TransfersPatagoniatrip$62.21True
RC-1066Day-trip bus with driverPatagonia Rail & BusPatagoniaday$142.90True

#Package cost lines with sums in the footer, grouped on demand

Drag Cost group, Supplier or Season into the bar: every group gets Qty and Total sums in its footer while the grid footer keeps the overall total.

Drag a column header here to group by that column
Season Cost group Supplier Service Qty Unit Net rate Total Rate basis
SpringA TransportOverhead Bin AirwaysReturn flights, economy2pax$540.35$1,080.70Contract
SpringA TransportOverhead Bin AirwaysChecked baggage, 23 kg2pax$42.81$85.62Contract
SpringA TransportLisbon Airport TransfersAirport to hotel, private car1trip$56.71$56.71Spot
SpringA TransportLisbon Airport TransfersHotel to airport, private car1trip$68.29$68.29Spot
SpringA TransportLisbon Rail & BusDay-trip bus with driver1day$124.94$124.94Spot
SpringB AccommodationHotel Lisbon CentralDouble room with breakfast7night$149.39$1,045.73Contract
SpringB AccommodationHotel Lisbon CentralLate checkout on departure day1stay$54.43$54.43Spot
SpringC ExperiencesLisbon WalksOld town walking tour2pax$35.26$70.52Contract
SpringC ExperiencesLisbon WalksEvening food tour2pax$90.97$181.94Spot
SpringC ExperiencesLisbon Day ToursFull-day excursion with lunch2pax$140.90$281.80Contract
SpringC ExperiencesLisbon Day ToursEntrance tickets2pax$26.74$53.48Spot
SpringC ExperiencesTaste of LisbonCooking class with market visit2pax$82.86$165.72Contract
SpringD ServicesRainy Day Travel CoverTravel insurance, comprehensive2pax$56.71$113.42Contract
SpringD ServicesRazor Sharp Getaways, head officeBooking fee1booking$49.80$49.80Contract
SpringD ServicesRazor Sharp Getaways, head officeDocuments and delivery1booking$16.95$16.95Contract
SummerA TransportOverhead Bin AirwaysReturn flights, economy2pax$675.44$1,350.88Contract
SummerA TransportOverhead Bin AirwaysChecked baggage, 23 kg2pax$53.51$107.02Contract
SummerA TransportLisbon Airport TransfersAirport to hotel, private car1trip$64.81$64.81Spot
SummerA TransportLisbon Airport TransfersHotel to airport, private car1trip$61.31$61.31Spot
SummerA TransportLisbon Rail & BusDay-trip bus with driver1day$273.40$273.40Spot
SummerB AccommodationHotel Lisbon CentralDouble room with breakfast7night$186.74$1,307.18Contract
SummerB AccommodationHotel Lisbon CentralLate checkout on departure day1stay$68.11$68.11Spot
SummerC ExperiencesLisbon WalksOld town walking tour2pax$44.08$88.16Contract
SummerC ExperiencesLisbon WalksEvening food tour2pax$111.62$223.24Spot
SummerC ExperiencesLisbon Day ToursFull-day excursion with lunch2pax$176.12$352.24Contract
SummerC ExperiencesLisbon Day ToursEntrance tickets2pax$23.71$47.42Spot
SummerC ExperiencesTaste of LisbonCooking class with market visit2pax$103.58$207.16Contract
SummerD ServicesRainy Day Travel CoverTravel insurance, comprehensive2pax$70.89$141.78Contract
SummerD ServicesRazor Sharp Getaways, head officeBooking fee1booking$62.25$62.25Contract
SummerD ServicesRazor Sharp Getaways, head officeDocuments and delivery1booking$21.19$21.19Contract
FallA TransportOverhead Bin AirwaysReturn flights, economy2pax$567.37$1,134.74Contract
FallA TransportOverhead Bin AirwaysChecked baggage, 23 kg2pax$44.95$89.90Contract
FallA TransportLisbon Airport TransfersAirport to hotel, private car1trip$80.85$80.85Spot
FallA TransportLisbon Airport TransfersHotel to airport, private car1trip$54.23$54.23Spot
FallA TransportLisbon Rail & BusDay-trip bus with driver1day$259.21$259.21Spot
FallB AccommodationHotel Lisbon CentralDouble room with breakfast7night$156.86$1,098.02Contract
FallB AccommodationHotel Lisbon CentralLate checkout on departure day1stay$53.32$53.32Spot
FallC ExperiencesLisbon WalksOld town walking tour2pax$37.02$74.04Contract
FallC ExperiencesLisbon WalksEvening food tour2pax$92.65$185.30Spot
FallC ExperiencesLisbon Day ToursFull-day excursion with lunch2pax$147.94$295.88Contract
FallC ExperiencesLisbon Day ToursEntrance tickets2pax$23.20$46.40Spot
FallC ExperiencesTaste of LisbonCooking class with market visit2pax$87.00$174.00Contract
FallD ServicesRainy Day Travel CoverTravel insurance, comprehensive2pax$59.55$119.10Contract
FallD ServicesRazor Sharp Getaways, head officeBooking fee1booking$52.29$52.29Contract
FallD ServicesRazor Sharp Getaways, head officeDocuments and delivery1booking$17.80$17.80Contract
WinterA TransportOverhead Bin AirwaysReturn flights, economy2pax$459.30$918.60Contract
WinterA TransportOverhead Bin AirwaysChecked baggage, 23 kg2pax$36.39$72.78Contract
WinterA TransportLisbon Airport TransfersAirport to hotel, private car1trip$39.83$39.83Spot
WinterA TransportLisbon Airport TransfersHotel to airport, private car1trip$50.04$50.04Spot
WinterA TransportLisbon Rail & BusDay-trip bus with driver1day$171.39$171.39Spot
WinterB AccommodationHotel Lisbon CentralDouble room with breakfast7night$126.98$888.86Contract
WinterB AccommodationHotel Lisbon CentralLate checkout on departure day1stay$46.44$46.44Spot
WinterC ExperiencesLisbon WalksOld town walking tour2pax$29.97$59.94Contract
WinterC ExperiencesLisbon WalksEvening food tour2pax$55.39$110.78Spot
WinterC ExperiencesLisbon Day ToursFull-day excursion with lunch2pax$119.76$239.52Contract
WinterC ExperiencesLisbon Day ToursEntrance tickets2pax$25.32$50.64Spot
WinterC ExperiencesTaste of LisbonCooking class with market visit2pax$70.43$140.86Contract
WinterD ServicesRainy Day Travel CoverTravel insurance, comprehensive2pax$48.20$96.40Contract
WinterD ServicesRazor Sharp Getaways, head officeBooking fee1booking$42.33$42.33Contract
WinterD ServicesRazor Sharp Getaways, head officeDocuments and delivery1booking$14.41$14.41Contract

Documentation

ParameterTypeDefaultDescription
AllowGroupingboolfalseRequired for any grouping. Shows the group bar, lets a header be dragged onto it and a chip be removed, and makes GroupColumns take effect; off, the grid stays flat.
GroupColumnsList<string>?nullFields to group by on first render, outermost first. A new list instance re-syncs the groups.
HideGroupedColumnsbooltrueHides a grouped column from the data rows. False keeps it in place as well.
ShowGroupCountboolfalseAppends (n items) to each caption.
DefaultGroupsCollapsedboolfalseStart with every group collapsed.
ShowGroupExpandCollapsebooltrueShows the Expand All / Collapse All toggle in the group bar.
GroupExpandIconStyleGroupExpandIconStyleGroupExpandIconStyle.PlusMinusPlusMinus boxes or Triangle chevrons on the caption rows. The expand-icon template and glyph parameters override the preset.
GroupHeaderTextSelectorFunc<string, string, IReadOnlyList<TValue>, string>?nullReplaces the caption text. Receives the field, the key as text and the group's rows; the key itself, and so collapse state, is unchanged.
AggregateRowsList<AggregateRow>?nullWhat to compute and where to print it; the two tables below.
GroupedColumnColor / GroupItemTextColor / GroupTotalTextColorstring""Optional CSS colors for the grouped values in caption rows and chips, the caption text, and the aggregate values. Empty inherits.
ShowRowCountInFooterboolfalsePrints the row count of the complete filtered result in the footer, not of the rendered window or page.
EnableGroupedRowWindowingbooltrueWindows the rows of a grouped grid the way a flat grid is windowed. Off renders every row.
GroupFooterTemplateRenderFragment<object>?nullDeclared, but GridControl never reads it.
GroupFootersAlwaysVisibleboolfalseDeclared, but GridControl never reads it.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.