Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Sort by Summaries

Company Name 
Region 
Unit Price 
Quantity 
Total Ascending
ExpandCountry: Poland (Sum=$3,531.95)
ExpandCountry: Norway (Sum=$5,735.15)
ExpandCountry: Argentina (Sum=$8,119.10)
ExpandCountry: Portugal (Sum=$12,468.65)
ExpandCountry: Italy (Sum=$16,705.15)
ExpandCountry: Spain (Sum=$19,431.89)
ExpandCountry: Finland (Sum=$19,778.45)
ExpandCountry: Mexico (Sum=$24,073.45)
ExpandCountry: Switzerland (Sum=$32,919.50)
ExpandCountry: Denmark (Sum=$34,782.25)
Page 1 of 3 (21 items)Prev123Next

The DevExpress ASP.NET Grid View (ASPxGridView) provides a rich API to sort data groups by their summary values.

In this demo, the ASPxGridView is grouped by country. Use the ‘Sort by summary mode’ combo box to select the required sort order. For instance, select Descending to sort grouped rows so that countries with the highest sales appear at the top of the view.

Group rows are sorted by summary value based on the information provided by ASPxGroupSummarySortInfo objects. Properties introduced by these objects represent the sort order, summary item used to calculate summary values, etc. These properties are read-only and initialized by the constructor.

To sort group rows by summary value, create a new ASPxGroupSummarySortInfo object and add it to the ASPxGridView's GroupSummarySortInfo collection using the GroupSummarySortInfoCollection.Add method. After the ASPxGroupSummarySortInfo object has been added to the collection, group rows are automatically sorted by their summary values.


See Also:
Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxGridViewDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxGridViewDemos