ASPxTreeList.SortBy(TreeListDataColumn, ColumnSortOrder) Method
Sorts data by the specified column’s values.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public ColumnSortOrder SortBy(
TreeListDataColumn column,
ColumnSortOrder sortOrder
)
#Parameters
Name | Type | Description |
---|---|---|
column | Tree |
A Tree |
sort |
Column |
A Column |
#Returns
Type | Description |
---|---|
Column |
A Column |
#Remarks
The ASPxTreeList allows data sorting by multiple columns. Any previous sorting is not cleared when calling the SortBy method. The new sort order applies an additional sorting condition to the one previously applied. The newly sorted column is appended to the collection of sorted columns. Its index within the collection can be obtained via its TreeListDataColumn.SortIndex property.
You can also use the overloaded SortBy method that allows the column’s position among sorted columns to be specified.
Sorting is allowed if the TreeListSettingsBehavior.AllowSort property is set to true
.