ASPxTreeList.SortBy(TreeListDataColumn, Int32) Method
Sorts data by the values of the specified data column, and places the column in the specified position among the sorted columns.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Parameters
Name | Type | Description |
---|---|---|
column | TreeListDataColumn | A TreeListDataColumn object that represents the column within the ASPxTreeList. |
sortIndex | Int32 | An integer value that specifies the zero-based column’s index among the sorted columns. -1 if data is not sorted by this column. |
Returns
Type | Description |
---|---|
Int32 | An integer value that specifies the zero-based column’s index among the sorted columns. |
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.
If no sorting is applied to the column, the SortBy method sorts data in the ascending order.
Sorting is allowed if the TreeListSettingsBehavior.AllowSort property is set to true
.