Blazorise DataGrid: Aggregates

Show aggregate values in the footer of the grid.

Overview

The DataGrid provider several built-in aggregates for column values. Supported aggregate functions are:

  • Sum Calculate total(sum) value of the collection.
  • Average Calculates the average of the numeric items in the collection.
  • Min Finds the smallest value in the collection.
  • Max Finds the largest value in the collection.
  • Count Counts the elements in a collection.
  • TrueCount Counts boolean elements with true value.
  • FalseCount Counts boolean elements with false value.

Examples

Aggregates

DataGrid will automatically generate necessary group cells based on the defined DataGridAggregate options.
#
First Name
Last Name
Email
Salary
1SamuelCollier[email protected]86 030,41 €
2IrvinZiemann[email protected]61 781,31 €
3GeraldPollich[email protected]58 810,75 €
4CoraConn[email protected]84 414,66 €
5AlfonsoD'Amore[email protected]69 318,29 €
6JessieWilkinson[email protected]78 566,12 €
7GregoryRenner[email protected]57 456,82 €
8MaryannHilpert[email protected]89 153,38 €
9MerlePacocha[email protected]55 349,94 €
10AngelinaWard[email protected]73 625,86 €
Total emails: 49936 847 614,76 €

Large Data

By default all aggregate operations are run on in-memory Data. When working with large datasets that is not possible. So just as in the previous examples for large datasets you need to work with ReadData and set the AggregateData property.
#
First Name
Last Name
Email
Salary
1SamuelCollier[email protected]86 030,41 €
2IrvinZiemann[email protected]61 781,31 €
3GeraldPollich[email protected]58 810,75 €
4CoraConn[email protected]84 414,66 €
5AlfonsoD'Amore[email protected]69 318,29 €
6JessieWilkinson[email protected]78 566,12 €
7GregoryRenner[email protected]57 456,82 €
8MaryannHilpert[email protected]89 153,38 €
9MerlePacocha[email protected]55 349,94 €
10AngelinaWard[email protected]73 625,86 €
11KaraBrekke[email protected]58 321,87 €
12YvetteFerry[email protected]89 658,90 €
13PabloFriesen[email protected]77 090,27 €
14ErnestHomenick[email protected]54 910,14 €
15LeslieWehner[email protected]78 930,58 €
16MiguelLynch[email protected]65 348,06 €
17TommySwaniawski[email protected]92 326,27 €
18ViolaWilderman[email protected]76 575,00 €
19BrendaJacobson[email protected]86 145,68 €
20RogerHerzog[email protected]53 168,45 €
21CaseyWeber[email protected]56 257,49 €
22TaraSchoen[email protected]72 637,29 €
23AlSanford[email protected]88 870,12 €
24JillStokes[email protected]59 252,89 €
25MarianArmstrong[email protected]69 182,74 €
26JanieStanton[email protected]51 608,79 €
27DixieBlock[email protected]89 653,26 €
28TeresaDietrich[email protected]56 151,34 €
29ReneeHerzog[email protected]93 592,47 €
30DamonLubowitz[email protected]89 271,37 €
31CodyRau[email protected]63 067,69 €
32EthelKassulke[email protected]92 175,30 €
33RudyWalsh[email protected]76 356,17 €
34RossHauck[email protected]51 620,31 €
35OtisLittle[email protected]77 906,94 €
36BenjaminFriesen[email protected]78 343,54 €
37MosesMosciski[email protected]99 202,48 €
38KellieMurazik[email protected]98 314,89 €
39NicholeKeebler[email protected]65 412,00 €
40BobbieRogahn[email protected]52 889,16 €
41CharlieBorer[email protected]50 448,59 €
42LuisRutherford[email protected]83 863,06 €
43JaredPfannerstill[email protected]54 282,76 €
44FloydSatterfield[email protected]59 157,17 €
45ClaudeParker[email protected]58 576,97 €
46DonaldDaugherty[email protected]66 692,86 €
47RolandBruen[email protected]98 404,23 €
48PaulineConroy[email protected]69 674,96 €
49LoraLockman[email protected]74 035,99 €
50JoeyKoelpin[email protected]57 184,86 €
51StaceyGraham[email protected]88 562,39 €
52DaisyMedhurst[email protected]51 011,13 €
53ErinCorwin[email protected]70 013,81 €
54ArturoDenesik[email protected]61 456,56 €
55CherylCollier[email protected]59 868,88 €
56AndresWilliamson[email protected]74 180,71 €
57PhyllisWilderman[email protected]59 518,29 €
58BillyWiza[email protected]92 241,90 €
59WoodrowGibson[email protected]90 288,10 €
60CristinaHarris[email protected]81 762,53 €
61DarleneDaniel[email protected]74 142,55 €
62CourtneyFrami[email protected]68 435,70 €
63MaeFeeney[email protected]65 623,26 €
64JoshDoyle[email protected]87 057,60 €
65GwenAbbott[email protected]65 189,89 €
66MonaBeier[email protected]80 367,71 €
67MinnieCorwin[email protected]78 002,56 €
68DwightRunolfsson[email protected]73 986,40 €
69BethBartell[email protected]85 841,65 €
70SteveSchulist[email protected]94 190,45 €
71PamGreenholt[email protected]75 695,28 €
72DarrelWilliamson[email protected]70 327,72 €
73RolandoSauer[email protected]84 971,22 €
74CesarSchaefer[email protected]92 704,04 €
75LuisLeannon[email protected]61 167,01 €
76FannieWilliamson[email protected]94 194,50 €
77MariannePouros[email protected]71 394,54 €
78SpencerRogahn[email protected]55 993,84 €
79DonnieLuettgen[email protected]77 655,38 €
80BlancaBreitenberg[email protected]75 633,97 €
81PatRohan[email protected]50 151,72 €
82VirginiaKassulke[email protected]77 411,81 €
83LelaBreitenberg[email protected]53 894,64 €
84RandalKoss[email protected]93 602,37 €
85KimberlyChristiansen[email protected]65 089,52 €
86JeanBoyer[email protected]99 805,01 €
87MurielShields[email protected]66 809,95 €
88MarcusEmmerich[email protected]99 401,27 €
89FaithNicolas[email protected]50 439,25 €
90BoydDavis[email protected]58 591,48 €
91WilburStiedemann[email protected]64 479,16 €
92RobertoStracke[email protected]57 007,18 €
93MindySmitham[email protected]56 810,55 €
94DianneMaggio[email protected]73 990,94 €
95MandyBahringer[email protected]69 018,94 €
96MarlonLedner[email protected]72 372,09 €
97LaverneSchuster[email protected]84 767,07 €
98KendraCorkery[email protected]79 303,18 €
99ChrisBarton[email protected]68 642,57 €
100EdPrice[email protected]84 665,20 €
101TraceyDurgan[email protected]63 539,54 €
102AlyssaGaylord[email protected]92 963,65 €
103HelenMueller[email protected]51 704,43 €
104RonaldMoen[email protected]88 173,43 €
105GerardMcDermott[email protected]79 616,46 €
106SamanthaZboncak[email protected]75 298,13 €
107VanGleichner[email protected]90 917,71 €
108FrederickBode[email protected]52 949,98 €
109LelaGutmann[email protected]52 247,22 €
110HarveyGutmann[email protected]82 998,73 €
111LuisRobel[email protected]91 952,69 €
112BrandiWard[email protected]70 341,50 €
113MargieHills[email protected]93 092,75 €
114TobyBeatty[email protected]66 829,50 €
115BobbyWard[email protected]82 475,01 €
116JasonBarrows[email protected]87 777,57 €
117FrancisUllrich[email protected]69 615,22 €
118HermanMarquardt[email protected]84 744,26 €
119FrancisGleason[email protected]58 666,45 €
120CarolynKunze[email protected]80 404,42 €
121TerryRogahn[email protected]69 352,10 €
122KendraSenger[email protected]93 641,61 €
123RochelleKessler[email protected]96 931,95 €
124YvonneHalvorson[email protected]94 598,15 €
125KendraBernhard[email protected]59 931,41 €
126KatherinePrice[email protected]60 998,60 €
127LillianWyman[email protected]52 545,83 €
128VelmaWunsch[email protected]74 742,06 €
129KristyHerman[email protected]96 811,63 €
130ErickParker[email protected]88 902,23 €
131DeanJohnston[email protected]72 987,32 €
132PhillipBrekke[email protected]69 227,78 €
133AshleyBlick[email protected]74 736,25 €
134LarryFeeney[email protected]76 448,86 €
135KaylaGlover[email protected]97 369,33 €
136AlvinSimonis[email protected]62 546,08 €
137KevinKassulke[email protected]80 076,32 €
138TeresaO'Kon[email protected]87 065,63 €
139EllaCartwright[email protected]90 099,49 €
140AlbertHowe[email protected]50 647,80 €
141AndrewPfeffer[email protected]99 691,54 €
142GarrettJenkins[email protected]56 963,04 €
143LouisKuvalis[email protected]80 519,61 €
144MyrtleTromp[email protected]69 930,94 €
145AndrewMurphy[email protected]55 579,15 €
146PatriciaGaylord[email protected]89 805,17 €
147PrestonKuvalis[email protected]83 615,78 €
148MerleOsinski[email protected]92 220,65 €
149AlbertoBernhard[email protected]52 655,29 €
150DarrellBeatty[email protected]54 224,58 €
151JoanneBartoletti[email protected]53 083,34 €
152GloriaBahringer[email protected]65 360,79 €
153CameronHane[email protected]74 440,82 €
154ConradDooley[email protected]79 099,12 €
155ErikMarks[email protected]93 408,43 €
156CarolynWolff[email protected]97 583,81 €
157SilviaO'Hara[email protected]72 185,23 €
158DexterHettinger[email protected]90 261,40 €
159MargaretLedner[email protected]62 783,44 €
160EllisHerzog[email protected]60 940,26 €
161MerleBahringer[email protected]53 660,05 €
162RobertoYost[email protected]61 169,10 €
163StacyKuhlman[email protected]93 823,76 €
164CoreyMonahan[email protected]57 966,22 €
165ChelseaSawayn[email protected]52 049,90 €
166CliftonMills[email protected]68 356,52 €
167TeriKling[email protected]67 176,87 €
168TanyaFarrell[email protected]58 393,52 €
169MarianneCarroll[email protected]92 390,80 €
170RosaliePurdy[email protected]86 463,78 €
171ShirleyGreenfelder[email protected]91 685,68 €
172DeloresSteuber[email protected]94 113,92 €
173TerriKlein[email protected]68 647,08 €
174MarjorieBeahan[email protected]84 706,53 €
175ReginaldReinger[email protected]85 323,79 €
176KelleyBode[email protected]79 071,76 €
177LorenHowell[email protected]93 204,93 €
178LindseySmith[email protected]99 085,43 €
179DougWilkinson[email protected]79 267,68 €
180BernadetteWatsica[email protected]77 302,18 €
181BillyVolkman[email protected]68 235,94 €
182CourtneyReinger[email protected]54 541,73 €
183MarjorieDietrich[email protected]51 211,89 €
184MeghanPollich[email protected]62 102,58 €
185PhillipSmitham[email protected]79 097,74 €
186VernaKlocko[email protected]66 963,02 €
187RodolfoMertz[email protected]57 742,48 €
188SabrinaHyatt[email protected]82 874,64 €
189RogerLehner[email protected]85 927,11 €
190JuliaHuels[email protected]67 309,00 €
191MayReynolds[email protected]96 990,64 €
192BennieWilliamson[email protected]67 591,28 €
193EvanOkuneva[email protected]79 220,93 €
194DianaRohan[email protected]78 141,34 €
195ShariSmitham[email protected]60 195,83 €
196EllaSchiller[email protected]83 482,98 €
197KarenTowne[email protected]54 088,60 €
198KellyJones[email protected]78 290,86 €
199RobinLesch[email protected]66 805,27 €
200GuyMayert[email protected]68 127,67 €
201MistyOndricka[email protected]75 954,94 €
202JuliusWhite[email protected]78 706,96 €
203JoshGaylord[email protected]60 487,10 €
204DebraJohnston[email protected]83 953,91 €
205KellieMarks[email protected]64 800,44 €
206TaylorGoodwin[email protected]83 261,10 €
207LeeMetz[email protected]98 403,81 €
208EddieMurazik[email protected]68 029,89 €
209ErnestoMcLaughlin[email protected]99 436,01 €
210LaurenceTurner[email protected]51 909,85 €
211HazelVandervort[email protected]94 267,75 €
212CeceliaNader[email protected]74 472,40 €
213PhilLedner[email protected]68 881,51 €
214KrystalMetz[email protected]83 250,52 €
215DonAltenwerth[email protected]52 897,75 €
216CandaceMcCullough[email protected]96 247,14 €
217SabrinaGulgowski[email protected]50 276,69 €
218LaurenceBatz[email protected]64 410,12 €
219ShaneRippin[email protected]75 551,08 €
220BernadetteMorissette[email protected]98 512,13 €
221AlexanderWest[email protected]61 698,25 €
222StellaMcKenzie[email protected]78 466,06 €
223ArleneParker[email protected]57 641,64 €
224BrettDurgan[email protected]67 162,65 €
225MurielTremblay[email protected]78 588,45 €
226AdamUpton[email protected]88 672,89 €
227LesterBartell[email protected]59 093,66 €
228CristinaStreich[email protected]81 916,04 €
229ErnestineHeathcote[email protected]71 069,20 €
230ClarenceEmard[email protected]82 071,65 €
231MonaKertzmann[email protected]56 353,15 €
232TraceyPfeffer[email protected]91 484,81 €
233TonyHartmann[email protected]80 992,77 €
234HarryTreutel[email protected]51 423,99 €
235ErvinTillman[email protected]82 561,69 €
236DerekSchoen[email protected]95 956,53 €
237AnthonyPrice[email protected]74 884,58 €
238ShariZboncak[email protected]96 737,83 €
239GlennLeannon[email protected]63 534,18 €
240GuyTreutel[email protected]60 108,71 €
241AngieHoppe[email protected]65 635,04 €
242CatherineBartell[email protected]98 196,01 €
243TimmyTorp[email protected]54 958,10 €
244WalterSchimmel[email protected]51 050,65 €
245CeciliaLakin[email protected]95 127,62 €
246ColinReichel[email protected]66 112,87 €
247VictoriaDeckow[email protected]60 492,50 €
248HomerCormier[email protected]90 229,04 €
249SpencerO'Reilly[email protected]60 243,52 €
250AllanHand[email protected]59 170,08 €
251CameronOndricka[email protected]79 858,60 €
252MarkBins[email protected]52 790,83 €
253JaimeJacobson[email protected]76 493,75 €
254IrmaWatsica[email protected]58 546,05 €
255ShaunBraun[email protected]59 642,92 €
256DianaEffertz[email protected]82 583,67 €
257StevenDooley[email protected]64 657,62 €
258IrmaKovacek[email protected]94 208,96 €
259EmmettHerzog[email protected]67 817,81 €
260KellyDavis[email protected]71 400,98 €
261LuzMorar[email protected]64 577,48 €
262MartaHarris[email protected]66 971,72 €
263MabelWolff[email protected]74 724,96 €
264SamuelGutkowski[email protected]60 034,46 €
265EmmaEmmerich[email protected]72 648,66 €
266IrvinMitchell[email protected]50 003,10 €
267NicolasHalvorson[email protected]71 526,27 €
268CharlieJerde[email protected]73 030,99 €
269RamonaDibbert[email protected]74 358,11 €
270CliftonKlein[email protected]97 270,09 €
271StellaSteuber[email protected]59 692,64 €
272JuanitaChamplin[email protected]72 780,75 €
273IsaacStamm[email protected]69 292,97 €
274DoyleSchumm[email protected]51 427,45 €
275ClayGrimes[email protected]51 772,08 €
276RolandMayert[email protected]81 883,80 €
277EdmondBahringer[email protected]50 929,17 €
278RandallDaniel[email protected]89 905,30 €
279GregorySpencer[email protected]74 161,60 €
280OwenSwaniawski[email protected]95 707,25 €
281LavernePacocha[email protected]65 789,34 €
282SaraShields[email protected]86 180,98 €
283ChristianHoeger[email protected]71 363,32 €
284DamonDenesik[email protected]55 400,84 €
285MarjorieEmmerich[email protected]63 652,59 €
286TashaBorer[email protected]94 186,62 €
287JosephKris[email protected]67 814,68 €
288BethanyBeer[email protected]65 998,18 €
289TerranceThiel[email protected]80 137,01 €
290BobCasper[email protected]68 748,43 €
291JoeLakin[email protected]98 278,19 €
292LeeWolff[email protected]94 738,69 €
293AlvinSmith[email protected]68 593,23 €
294JimmieDietrich[email protected]84 267,88 €
295TyroneDach[email protected]94 728,32 €
296VanMills[email protected]60 109,47 €
297TedGibson[email protected]65 825,81 €
298RoxanneKuhn[email protected]79 023,74 €
299ReginaKeeling[email protected]66 369,94 €
300HelenWitting[email protected]74 575,87 €
301OliverDaniel[email protected]54 641,11 €
302DougLeannon[email protected]76 076,55 €
303CarolSchmeler[email protected]83 833,88 €
304DonMills[email protected]53 632,72 €
305LindseyConsidine[email protected]98 571,25 €
306GraceNader[email protected]82 399,49 €
307CandiceRodriguez[email protected]90 887,74 €
308LulaSchultz[email protected]97 039,29 €
309LeeBins[email protected]71 842,44 €
310SaulHowe[email protected]52 676,35 €
311LouiseGislason[email protected]88 305,26 €
312MyrtleHackett[email protected]68 996,49 €
313CaseyZemlak[email protected]57 259,51 €
314KristenHuel[email protected]54 689,50 €
315KristaKris[email protected]93 758,65 €
316DanielleJerde[email protected]99 301,40 €
317AngelicaTremblay[email protected]85 313,90 €
318LouiseAbshire[email protected]77 784,92 €
319WmBogisich[email protected]62 126,09 €
320MaryannWisoky[email protected]85 135,69 €
321BetsyWisozk[email protected]77 627,62 €
322AlexanderStoltenberg[email protected]99 611,36 €
323JudithFlatley[email protected]77 310,19 €
324StewartTreutel[email protected]50 889,65 €
325HelenSchiller[email protected]73 442,69 €
326HeidiHaag[email protected]51 397,29 €
327RossThiel[email protected]92 754,54 €
328AmandaSenger[email protected]89 441,31 €
329BethHilpert[email protected]62 114,78 €
330CurtisHessel[email protected]57 498,77 €
331AlmaGibson[email protected]90 762,65 €
332JeannetteSchaden[email protected]96 075,03 €
333RobertoHerman[email protected]97 894,29 €
334ClarenceBlanda[email protected]50 450,45 €
335JefferyKassulke[email protected]55 046,88 €
336TrevorSchuppe[email protected]80 338,20 €
337RonLebsack[email protected]55 184,82 €
338CedricAuer[email protected]67 321,90 €
339GinaSchiller[email protected]89 055,19 €
340JuliusSchmidt[email protected]69 183,31 €
341BrandiCorkery[email protected]67 152,53 €
342AliciaMcClure[email protected]93 251,90 €
343MicheleWaters[email protected]92 624,38 €
344KristenHoeger[email protected]60 848,20 €
345KateHeathcote[email protected]62 751,58 €
346RudolphLeffler[email protected]90 085,95 €
347GarryMcCullough[email protected]87 440,86 €
348TraceyRutherford[email protected]71 584,47 €
349ShellyBartoletti[email protected]95 964,97 €
350JohnnyPadberg[email protected]91 804,24 €
351DavidSmitham[email protected]68 092,90 €
352PriscillaConroy[email protected]92 922,27 €
353ShannonEmard[email protected]53 804,17 €
354PaulaKautzer[email protected]53 365,86 €
355JayDouglas[email protected]62 473,03 €
356WesleyTorphy[email protected]54 390,81 €
357LorraineWilliamson[email protected]80 333,70 €
358JohannaHahn[email protected]55 954,42 €
359AlexanderMertz[email protected]99 571,59 €
360WilsonBruen[email protected]64 776,40 €
361HubertPfannerstill[email protected]63 008,59 €
362AlanO'Kon[email protected]80 885,59 €
363WillieMetz[email protected]51 930,24 €
364JoeyFerry[email protected]94 608,69 €
365RickyHermann[email protected]83 772,49 €
366DevinStamm[email protected]94 867,24 €
367JoshuaHomenick[email protected]76 817,11 €
368LarryDaugherty[email protected]73 207,94 €
369ClaudeGleason[email protected]85 370,52 €
370SammyMurazik[email protected]69 384,89 €
371AngelinaAbshire[email protected]60 717,13 €
372TashaKunze[email protected]64 904,36 €
373LulaCollier[email protected]90 212,24 €
374DeannaStiedemann[email protected]78 268,35 €
375ShelleyJohns[email protected]87 217,90 €
376AlbertLittle[email protected]81 290,85 €
377CarlosReichel[email protected]98 138,19 €
378EbonySchiller[email protected]68 048,74 €
379AndrewSchultz[email protected]60 699,23 €
380EbonyStrosin[email protected]62 514,96 €
381JanetHauck[email protected]84 912,58 €
382DarrylBarton[email protected]52 279,26 €
383LawrenceReilly[email protected]69 375,45 €
384MerleAbbott[email protected]68 595,59 €
385HugoO'Conner[email protected]83 359,23 €
386JaniceRodriguez[email protected]80 747,25 €
387SabrinaRohan[email protected]87 173,33 €
388CarrieRutherford[email protected]60 272,93 €
389DexterMayert[email protected]76 548,50 €
390NeilCollier[email protected]65 578,63 €
391KurtHudson[email protected]69 301,70 €
392TraciBogisich[email protected]66 958,98 €
393MargieWisoky[email protected]73 741,48 €
394TonyaFahey[email protected]67 174,49 €
395RobinCummings[email protected]58 248,04 €
396EbonyDooley[email protected]95 321,75 €
397KerryKiehn[email protected]62 090,55 €
398EdmondZulauf[email protected]71 307,08 €
399DarrelRenner[email protected]97 531,20 €
400SamuelHintz[email protected]56 505,23 €
401MiltonSpencer[email protected]74 456,00 €
402RamonaKirlin[email protected]94 970,73 €
403BerniceWiegand[email protected]52 033,04 €
404EliasHowe[email protected]97 651,27 €
405RobertoYundt[email protected]62 652,13 €
406RosemarySchaefer[email protected]68 839,52 €
407TerryHaley[email protected]86 348,42 €
408SheriMitchell[email protected]57 715,42 €
409PerryKing[email protected]61 518,62 €
410BettyBotsford[email protected]97 322,93 €
411LouisWeimann[email protected]60 939,34 €
412MarshallHeidenreich[email protected]88 487,45 €
413LoisKoch[email protected]56 886,70 €
414AltonSchultz[email protected]87 849,82 €
415BryantCorwin[email protected]63 545,35 €
416ScottSchinner[email protected]63 194,44 €
417KarlaKrajcik[email protected]78 536,72 €
418AlfredoVandervort[email protected]60 981,53 €
419WesleyCole[email protected]63 627,14 €
420KristieHane[email protected]72 576,80 €
421JonathanHaag[email protected]67 395,58 €
422ShawnRatke[email protected]71 156,76 €
423EddieMetz[email protected]60 392,26 €
424FrancesBins[email protected]50 298,35 €
425TonyPfeffer[email protected]65 389,46 €
426YolandaSchuster[email protected]99 616,45 €
427LanaHalvorson[email protected]59 606,46 €
428AliciaBradtke[email protected]96 629,57 €
429AmosBaumbach[email protected]70 157,76 €
430FloydRaynor[email protected]81 088,19 €
431JonJenkins[email protected]57 446,39 €
432EliasKuphal[email protected]75 968,29 €
433PedroPredovic[email protected]79 226,86 €
434JessicaHeathcote[email protected]61 143,89 €
435LindseyKovacek[email protected]97 743,51 €
436TylerGreenfelder[email protected]95 764,51 €
437MarionKautzer[email protected]68 247,16 €
438JanieMarvin[email protected]59 593,98 €
439NathanBarton[email protected]98 958,20 €
440CeliaHagenes[email protected]55 858,97 €
441DelbertLubowitz[email protected]59 267,64 €
442KellyMedhurst[email protected]63 280,53 €
443RalphLueilwitz[email protected]50 350,17 €
444CaryYost[email protected]96 934,71 €
445LonnieBashirian[email protected]76 109,23 €
446ClaireBrown[email protected]63 015,21 €
447GraceHarber[email protected]76 656,79 €
448JanieMaggio[email protected]75 100,48 €
449LoraWolf[email protected]62 790,08 €
450ErmaLindgren[email protected]50 992,38 €
451ErikCruickshank[email protected]85 137,26 €
452WilburGrimes[email protected]61 844,22 €
453ShawnaParisian[email protected]85 909,02 €
454CindyGislason[email protected]55 927,69 €
455JulioBeer[email protected]84 416,72 €
456CaroleHintz[email protected]67 774,26 €
457GrantZieme[email protected]55 139,48 €
458BennyTurcotte[email protected]77 752,90 €
459MartyPredovic[email protected]88 693,35 €
460EloiseCartwright[email protected]67 841,90 €
461BertMacejkovic[email protected]70 948,62 €
462LuisHansen[email protected]57 917,28 €
463NoahSchinner[email protected]70 205,07 €
464DonSwift[email protected]83 846,08 €
465AlyssaPollich[email protected]92 025,52 €
466CraigWilderman[email protected]74 374,66 €
467AndresJenkins[email protected]68 743,52 €
468GuyLesch[email protected]59 731,59 €
469EugeneGoldner[email protected]88 579,25 €
470LindsayMarks[email protected]56 124,81 €
471TanyaHintz[email protected]70 772,36 €
472MaxCummerata[email protected]91 507,36 €
473PatsyChristiansen[email protected]86 900,25 €
474RuthBruen[email protected]93 391,25 €
475TomCole[email protected]60 015,88 €
476CharleneGoyette[email protected]75 040,63 €
477TedMann[email protected]77 324,64 €
478GeorgeFerry[email protected]86 090,05 €
479HoraceStark[email protected]75 461,10 €
480SandyKozey[email protected]61 485,46 €
481RichardHodkiewicz[email protected]81 577,34 €
482AngelinaRutherford[email protected]85 489,63 €
483AudreyChristiansen[email protected]99 398,50 €
484EllaLittel[email protected]65 535,18 €
485GinaBruen[email protected]50 564,33 €
486CarolynNolan[email protected]69 736,17 €
487BerniceLabadie[email protected]72 465,56 €
488KrystalPurdy[email protected]79 207,99 €
489TommieBrakus[email protected]98 868,50 €
490BernardWehner[email protected]93 934,24 €
491CaseyTerry[email protected]69 148,67 €
492ConnieHansen[email protected]63 577,44 €
493LoraStrosin[email protected]53 705,29 €
494GrantKlocko[email protected]87 161,39 €
495TerranceMonahan[email protected]93 972,86 €
496TroyRitchie[email protected]67 831,12 €
497DeannaKlocko[email protected]69 116,80 €
498SusieCasper[email protected]53 448,48 €
499DeannaGreenholt[email protected]62 398,17 €
Total emails: 00,00 €
<DataGrid TItem="Employee"
          Data="@employeeList"
          ReadData="@OnReadData"
          TotalItems="@totalEmployees"
          AggregateData="@employeeSummary"
          Responsive>
    <DataGridAggregates>
        <DataGridAggregate Field="@nameof( Employee.Email )" Aggregate="DataGridAggregateType.Count">
            <DisplayTemplate>
                @($"Total emails: {context.Value}")
            </DisplayTemplate>
        </DataGridAggregate>
        <DataGridAggregate Field="@nameof( Employee.Salary )" Aggregate="DataGridAggregateType.Sum" DisplayFormat="{0:C}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" />
        <DataGridAggregate Field="@nameof( Employee.IsActive )" Aggregate="DataGridAggregateType.TrueCount" />
    </DataGridAggregates>
    <DataGridColumns>
        <DataGridColumn Field="@nameof(Employee.Id)" Caption="#" Sortable="false" />
        <DataGridColumn Field="@nameof(Employee.FirstName)" Caption="First Name" Editable />
        <DataGridColumn Field="@nameof(Employee.LastName)" Caption="Last Name" Editable />
        <DataGridColumn Field="@nameof(Employee.Email)" Caption="Email" Editable />
        <DataGridColumn Field="@nameof(Employee.Salary)" Caption="Salary" DisplayFormat="{0:C}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" Editable>
            <EditTemplate>
                <NumericEdit TValue="decimal" Value="@((decimal)context.CellValue)" ValueChanged="@( v => context.CellValue = v)" />
            </EditTemplate>
        </DataGridColumn>
    </DataGridColumns>
</DataGrid>
@code{
    [Inject]
    public EmployeeData EmployeeData { get; set; }
    private List<Employee> employeeList;

    protected override async Task OnInitializedAsync()
    {
        employeeList = await EmployeeData.GetDataAsync();
        await base.OnInitializedAsync();
    }

    private int totalEmployees;
    private List<Employee> employeeSummary;

    private Task OnReadData( DataGridReadDataEventArgs<Employee> e )
    {
        if ( !e.CancellationToken.IsCancellationRequested )
        {
            List<Employee> response = null;

            // this can be call to anything, in this case we're calling a fictional api
            //var response = await Http.GetJsonAsync<Employee[]>( $"some-api/employees?page={e.Page}&pageSize={e.PageSize}" );
            if ( e.ReadDataMode is DataGridReadDataMode.Virtualize )
                response = employeeList.Skip( e.VirtualizeOffset ).Take( e.VirtualizeCount ).ToList();
            else if ( e.ReadDataMode is DataGridReadDataMode.Paging )
                response = employeeList.Skip( ( e.Page - 1 ) * e.PageSize ).Take( e.PageSize ).ToList();
            else
                throw new Exception( "Unhandled ReadDataMode" );


            if ( !e.CancellationToken.IsCancellationRequested )
            {
                totalEmployees = employeeList.Count;
                employeeList = new List<Employee>( response ); // an actual data for the current page
                                                               //var aggregateResponse = await Http.GetJsonAsync<Employee[]>( $"some-aggregate-api/employees" );
                employeeSummary = employeeList; //aggregateResponse.Data
            }
        }
        return Task.CompletedTask;
    }
}

API

See the documentation below for a complete reference to all of the props and classes available to the components mentioned here.

On this page