ASPxGroupSummarySortInfoCollection Class
A collection of ASPxGroupSummarySortInfo objects that allow you to sort group rows by summary values.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Related API Members
The following members return ASPxGroupSummarySortInfoCollection objects:
Library | Related API Members |
---|---|
ASP.NET Web Forms Controls | ASPxGridView.GroupSummarySortInfo |
ASP.NET MVC Extensions | GridViewSettings.GroupSummarySortInfo |
Remarks
Follow the steps below to sort group rows by summary values:
- Create a new ASPxGroupSummarySortInfo object.
- Specify its properties.
- Add this object to
ASPxGroupSummarySortInfoCollection
.
Use the GroupSummarySortInfo property to access the collection.
<dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" KeyFieldName="ProductID">
<Columns>
<dx:GridViewDataTextColumn FieldName="ProductID" VisibleIndex="0" />
<dx:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="1" GroupIndex="0" />
<dx:GridViewDataTextColumn FieldName="ProductName" VisibleIndex="2" />
</Columns>
<GroupSummary>
<dx:ASPxSummaryItem FieldName="ProductName" SummaryType="Count" />
</GroupSummary>
</dx:ASPxGridView>
protected void Page_Load(object sender, EventArgs e) {
grid.GroupSummarySortInfo.Clear();
ASPxGroupSummarySortInfo sortInfo = new ASPxGroupSummarySortInfo();
sortInfo.SortOrder = ColumnSortOrder.Descending;
sortInfo.SummaryItem = grid.GroupSummary["ProductName", SummaryItemType.Count];
sortInfo.GroupColumn = "CategoryName";
grid.GroupSummarySortInfo.AddRange(sortInfo);
}
Implements
DevExpress.Utils.IAssignableCollection
Inheritance
See Also