aspnet-devexpress-dot-web-dot-aspxgroupsummarysortinfo-3287b903.md
Specifies the sort order of group rows.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(ColumnSortOrder.None)]
public ColumnSortOrder SortOrder { get; set; }
<DefaultValue(ColumnSortOrder.None)>
Public Property SortOrder As ColumnSortOrder
| Type | Default | Description |
|---|---|---|
| ColumnSortOrder | None |
The sort order.
|
Available values:
| Name | Description |
|---|---|
| None |
No sorting is applied to a column.
| | Ascending |
Sorts the column in ascending order.
| | Descending |
Sorts the columns in descending order.
|
<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);
}
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
grid.GroupSummarySortInfo.Clear()
Dim sortInfo As ASPxGroupSummarySortInfo = New ASPxGroupSummarySortInfo()
sortInfo.SortOrder = ColumnSortOrder.Descending
sortInfo.SummaryItem = grid.GroupSummary("ProductName", SummaryItemType.Count)
sortInfo.GroupColumn = "CategoryName"
grid.GroupSummarySortInfo.AddRange(sortInfo)
End Sub
See Also
ASPxGroupSummarySortInfo Class