| ALFKI | Germany | Berlin | Alfreds Futterkiste | Maria Anders | 12 | $4,595.15 |
| ANATR | Mexico | México D.F. | Ana Trujillo Emparedados y helados | Ana Trujillo | 10 | $1,402.95 |
| ANTON | Mexico | México D.F. | Antonio Moreno Taquería | Antonio Moreno | 17 | $7,514.35 |
| AROUT | UK | London | Around the Horn | Thomas Hardy | 30 | $13,805.80 |
| BERGS | Sweden | Luleå | Berglunds snabbköp | Christina Berglund | 52 | $26,965.15 |
| BLAUS | Germany | Mannheim | Blauer See Delikatessen | Hanna Moos | 14 | $3,239.80 |
| BLONP | France | Strasbourg | Blondel père et fils | Frédérique Citeaux | 26 | $19,087.25 |
| BOLID | Spain | Madrid | Bólido Comidas preparadas | Martín Sommer | 6 | $5,297.10 |
| BONAP | France | Marseille | Bon app' | Laurence Lebihan | 44 | $23,847.75 |
| BOTTM | Canada | Tsawassen | Bottom-Dollar Markets | Elizabeth Lincoln | 35 | $22,604.75 |
| BSBEV | UK | London | B's Beverages | Victoria Ashworth | 22 | $6,089.90 |
| CACTU | Argentina | Buenos Aires | Cactus Comidas para llevar | Patricio Simpson | 11 | $1,814.80 |
| CENTC | Mexico | México D.F. | Centro comercial Moctezuma | Francisco Chang | 2 | $100.80 |
| CHOPS | Switzerland | Bern | Chop-suey Chinese | Yang Wang | 22 | $12,885.00 |
| COMMI | Brazil | São Paulo | Comércio Mineiro | Pedro Afonso | 10 | $3,810.75 |
| CONSH | UK | London | Consolidated Holdings | Elizabeth Brown | 7 | $1,719.10 |
| DRACD | Germany | Aachen | Drachenblut Delikatessen | Sven Ottlieb | 10 | $3,763.21 |
| DUMON | France | Nantes | Du monde entier | Janine Labrune | 9 | $1,615.90 |
| EASTC | UK | London | Eastern Connection | Ann Devon | 21 | $15,033.16 |
| ERNSH | Austria | Graz | Ernst Handel | Roland Mendel | 102 | $113,229.73 |
Source Code & Description
This example demonstrates how GroupByExpressions can be used
in Telerik RadGrid:
- Creating group-by expressions, testing expressions syntax:
-
Expression syntax: fieldname[ alias]|aggregate(fieldname)[ alias][, ...]
Group By fieldname[ sort][, ...]
Where:
fieldname: name of any
field from the DataSource
alias: alias string.
This cannot contain blanks or other reserved symbols like ',', '.' etc.
aggregate: any of - min,
max, sum, count, last, first etc (the same as in GridAggregateFunction
enumeration)
sort: acs or desc - the
sort order of the grouped items
Example: Country, City,
count(Country) Items, ContactName Group By Country, City desc
- Displaying additional information in each group header - like aggregate fields
- Dynamically add a "SubTotal" to each group, handling grid's grouping events
Additional info concerning the grouping feature of the control you can find in the
Grouping
section from the online help:
Declarative group-by expressions
Programmatic group-by expressions
Customizing GridGroupHeaderItem
Performing calculations in group header