Skip to main content

ASPxClientVerticalGrid.SortBy(row) Method

Sorts data by the specified data row‘s values, and places the row to the specified position among the sorted rows.

Declaration

SortBy(
    row: ASPxClientVerticalGridRow | number | string,
    sortOrder?: string,
    reset?: boolean,
    sortIndex?: number
): void

Parameters

Name Type Description
row string | number | ASPxClientVerticalGridRow
sortOrder string

A string value that specifies the row’s sort order (‘ASC’, ‘DSC’ or ‘NONE’).

reset boolean

true to clear any previous sorting; otherwise, false.

sortIndex number

The row’s index among the sorted rows. -1 if data is not sorted by this row.

Remarks

The ASPxVerticalGrid allows data sorting by multiple rows. Any previous sorting is not cleared if the reset parameter isn’t set to true. The newly sorted row is inserted at the specified position within the collection of sorted rows. Its position within the collection can then be changed using the VerticalGridDataRow.SortIndex property.

To sort row values in ascending or descending order, set the sortOrder parameter to ‘ASC’ or ‘DSC’, respectively. To clear sorting, set this parameter to ‘NONE’.

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

See Also