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

TreeList.EndSort() Method

Forces the control to update itself after the TreeList.BeginSort method has been called.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v19.1.dll

Declaration

public virtual void EndSort()

Remarks

Use the EndSort method in conjunction with the TreeList.BeginSort method. See this link to learn more.

Example

The following sample code demonstrates how to apply sorting to the Department and Budget columns.

Data is sorted via the TreeListColumn.SortOrder property. To avoid superfluous updates, the code is enclosed with the TreeList.BeginSort and TreeList.EndSort methods.

using DevExpress.XtraTreeList.Columns;
//...
treeList1.BeginSort();
treeList1.Columns["Department"].SortOrder = SortOrder.Ascending;
treeList1.Columns["Budget"].SortOrder = SortOrder.Descending;
treeList1.EndSort();
See Also