Skip to main content

GridViewModel.SortBy(GridViewColumnState, Boolean) Method

Changes the GridView’s sorting state according to the processed sorting operation.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v23.2.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public void SortBy(
    GridViewColumnState column,
    bool reset
)

Parameters

Name Type Description
column GridViewColumnState

A GridViewColumnState object containing the current state of the column related to the performed sorting operation.

reset Boolean

true if the SHIFT key was not pressed during the performed sort operation and the previous sorting state should be reset; false if the sort operation was performed with the SHIFT key pressed and the previous sorting state should be preserved.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SortBy(GridViewColumnState, Boolean) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also