ASPxGroupSummarySortInfoCollection Class

Represents a collection which contains the information required to sort the group rows by summary values.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll


public class ASPxGroupSummarySortInfoCollection :

The following members accept/return ASPxGroupSummarySortInfoCollection objects:

Library Related API Members
ASP.NET Web Forms Controls ASPxGridView.GroupSummarySortInfo
ASP.NET MVC Extensions GridViewSettings.GroupSummarySortInfo


This collection can be accessed via the ASPxGridView.GroupSummarySortInfo property. Each element in the collection is represented by an ASPxGroupSummarySortInfo object. Its properties specify the sort order, summary item used to calculate summary values for groups of rows, etc.

To sort group rows by summary values, you should create a new ASPxGroupSummarySortInfo object with the specified settings and add it to the ASPxGridView.GroupSummarySortInfo collection.


This example sorts group rows by summary values, so that countries that have the highest sales appear at the top of the view.

The image below shows the result:


using DevExpress.Data;
using DevExpress.Web.ASPxGridView;

protected void Page_Load(object sender, EventArgs e) {

    ASPxGroupSummarySortInfo sortInfo = new ASPxGroupSummarySortInfo();
    sortInfo.SortOrder = ColumnSortOrder.Descending;
    sortInfo.SummaryItem = grid.GroupSummary["Sales", SummaryItemType.Sum];
    sortInfo.GroupColumn = "Country";

<dxwgv:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" DataSourceID="AccessDataSource1" KeyFieldName="OrderID" Width="100%">
        <dxwgv:GridViewDataColumn FieldName="CompanyName" VisibleIndex="2" />            
        <dxwgv:GridViewDataColumn FieldName="City" VisibleIndex="3" />
        <dxwgv:GridViewDataColumn FieldName="Region" VisibleIndex="4" />            
        <dxwgv:GridViewDataColumn FieldName="Country" GroupIndex="0" VisibleIndex="5" />            
        <dxwgv:GridViewDataColumn FieldName="Sales" VisibleIndex="6" />            
        <dxwgv:ASPxSummaryItem FieldName="Sales" SummaryType="Sum" DisplayFormat="{0:c}"/>
See Also