| ALFKI | Germany | Berlin | Alfreds Futterkiste | Maria Anders | 12 | 4595.15 |
| ANATR | Mexico | México D.F. | Ana Trujillo Emparedados y helados | Ana Trujillo | 10 | 1402.95 |
| ANTON | Mexico | México D.F. | Antonio Moreno Taquería | Antonio Moreno | 17 | 7514.35 |
| AROUT | UK | London | Around the Horn | Thomas Hardy | 30 | 13805.8 |
| BERGS | Sweden | Luleå | Berglunds snabbköp | Christina Berglund | 52 | 26965.15 |
| BLAUS | Germany | Mannheim | Blauer See Delikatessen | Hanna Moos | 14 | 3239.8 |
| BLONP | France | Strasbourg | Blondel père et fils | Frédérique Citeaux | 26 | 19087.25 |
| BOLID | Spain | Madrid | Bólido Comidas preparadas | Martín Sommer | 6 | 5297.1 |
| BONAP | France | Marseille | Bon app' | Laurence Lebihan | 44 | 23847.75 |
| BOTTM | Canada | Tsawassen | Bottom-Dollar Markets | Elizabeth Lincoln | 35 | 22604.75 |
| BSBEV | UK | London | B's Beverages | Victoria Ashworth | 22 | 6089.9 |
| CACTU | Argentina | Buenos Aires | Cactus Comidas para llevar | Patricio Simpson | 11 | 1814.8 |
| CENTC | Mexico | México D.F. | Centro comercial Moctezuma | Francisco Chang | 2 | 100.8 |
| CHOPS | Switzerland | Bern | Chop-suey Chinese | Yang Wang | 22 | 12885 |
| COMMI | Brazil | São Paulo | Comércio Mineiro | Pedro Afonso | 10 | 3810.75 |
| CONSH | UK | London | Consolidated Holdings | Elizabeth Brown | 7 | 1719.1 |
| DRACD | Germany | Aachen | Drachenblut Delikatessen | Sven Ottlieb | 10 | 3763.21 |
| DUMON | France | Nantes | Du monde entier | Janine Labrune | 9 | 1615.9 |
| EASTC | UK | London | Eastern Connection | Ann Devon | 21 | 15033.16 |
| ERNSH | Austria | Graz | Ernst Handel | Roland Mendel | 102 | 113229.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