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: