Skip to main content
Tab

ASPxVerticalGrid.SortBy(VerticalGridRow, ColumnSortOrder) Method

Sorts data by the specified row‘s values.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public ColumnSortOrder SortBy(
    VerticalGridRow row,
    ColumnSortOrder value
)

Parameters

Name Type Description
row VerticalGridRow

A VerticalGridRow object that represents the row in the ASPxGridView.

value ColumnSortOrder

A ColumnSortOrder enumeration value that specifies the row’s sort order.

Returns

Type Description
ColumnSortOrder

A ColumnSortOrder enumeration value that specifies the row’s sort order.

Remarks

The ASPxVerticalGrid allows data sorting by multiple rows. Any previous sorting is not cleared when calling the SortBy method. The new sort order applies an additional sorting condition to the one previously applied. The newly sorted row is appended to the collection of sorted rows. Its index within the collection can be obtained using the VerticalGridDataRow.SortIndex property.

You can also use the overloaded SortBy method that allows the row’s position among sorted rows to be specified.

Sorting is allowed if the ASPxGridBehaviorSettings.AllowSort property is set to true.

See Also