Skip to main content
A newer version of this page is available. .

DataControlBase.ClearSorting() Method

Clears the sorting applied to the grid.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public void ClearSorting()

Remarks

If the grid’s data is not grouped, the ClearSorting method clears the sorting applied to columns. Otherwise, if grouping is applied, the ClearSorting method preserves sorting applied to grouping columns, because group rows are always sorted.

To ungroup the grid, use the GridControl.ClearGrouping method.

To learn more, see Sorting and Sorting in Code.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ClearSorting() 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