Skip to main content

GridControl.SortBy(GridColumn) Method

Sorts data by the values of the specified column.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v14.2.dll

#Declaration

public void SortBy(
    GridColumn column
)

#Parameters

Name Type Description
column GridColumn

A GridColumn object that represents the column within the grid.

#Remarks

The DXGrid for Silverlight control allows data sorting by multiple columns. Any previous sorting is not cleared when calling the SortBy method.

If the grid's data isn't sorted by the specified column, the SortBy method sorts data by its values in ascending order. The new sort order applies an additional sorting condition to the one previously applied. The grid creates a new GridSortInfo object with the specified settings and appends it to the GridControl.SortInfo collection.

End-users are allowed to sort data if the view's DataViewBase.AllowSorting property is set to true.

To learn more, see Sorting in Code and End-User Capabilities - Sorting Group Rows by Summary.

See Also