Skip to main content
Tab

ASPxCardView.SortBy(CardViewColumn, ColumnSortOrder) Method

Sorts data by the specified column values.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public ColumnSortOrder SortBy(
    CardViewColumn column,
    ColumnSortOrder value
)

Parameters

Name Type Description
column CardViewColumn

A CardViewColumn object that is a column in the ASPxCardView.

value ColumnSortOrder

One of the ColumnSortOrder enumeration values that specifies the column sort order.

Returns

Type Description
ColumnSortOrder

One of the ColumnSortOrder enumeration values that specifies the column sort order.

Remarks

The ASPxCardView allows data sorting by multiple columns. 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 column is appended to the collection of sorted columns. Its index within the collection can be obtained using the CardViewColumn.SortIndex property.

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

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

See Also