Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListControlBase.SortBy(TreeListColumn) Method

Sorts data against the specified column.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public void SortBy(
    TreeListColumn column
)

#Parameters

Name Type Description
column TreeListColumn

A column within the TreeListControl.

#Remarks

The TreeListControl allows you to sort data against multiple columns. Call the SortBy method to apply a new sort condition. The TreeListControl creates a new GridSortInfo object that stores sort parameters, and appends this object to the TreeListSortInfoCollection. The sort operation result depends on the order of the applied conditions within the collection. If the TreeListSortInfoCollection already contains a sort condition for the specified column, the TreeListControl replaces this condition with a new condition.

The SortBy(TreeListColumn) method sorts data in ascending order. To specify the sort order or sort condition index within the TreeListSortInfoCollection, call the SortBy(TreeListColumn, ColumnSortOrder) and SortBy(TreeListColumn, ColumnSortOrder, Int32) methods, respectively.

Refer to the following topics for more information: Sorting in Code and Sort Nodes.

See Also