Tab
A newer version of this page is available. Switch to the current version.

ASPxGroupSummarySortInfo Class

Contains the information required to sort group rows by summary values.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public class ASPxGroupSummarySortInfo :
    CollectionItem
Public Class ASPxGroupSummarySortInfo
    Inherits CollectionItem

Remarks

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.

Each ASPxGroupSummarySortInfo object contains settings used to calculate summary values for groups of rows. The ASPxGroupSummarySortInfo.GroupColumn property defines the nesting level of the group whose rows are sorted. The summary item and the sort order are specified by the ASPxGroupSummarySortInfo.SummaryItem and ASPxGroupSummarySortInfo.SortOrder properties, respectively.

Examples

This example shows how to sort group rows by summary values, so that countries having the maximum sales amount appear on the top of the view.

The image below shows the result:

exGroupSummarySort

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

protected void Page_Load(object sender, EventArgs e) {
    grid.GroupSummarySortInfo.Clear();

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

    grid.GroupSummarySortInfo.AddRange(sortInfo);
}

Inheritance

Object
StateManager
CollectionItem
ASPxGroupSummarySortInfo
See Also