Back to Devexpress

TreeList.EndSort() Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-44b89ef6.md

latest2.1 KB
Original Source

TreeList.EndSort() Method

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

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public virtual void EndSort()
vb
Public Overridable Sub

Remarks

Use the EndSort method in conjunction with the TreeList.BeginSort method.

Example

The following code sorts data against the Department and Budget columns. The TreeList.BeginSort and TreeList.EndSort methods wrap the code to avoid superfluous updates.

csharp
using DevExpress.XtraTreeList.Columns;
//...
treeList1.BeginSort();
treeList1.Columns["Department"].SortOrder = SortOrder.Ascending;
treeList1.Columns["Budget"].SortOrder = SortOrder.Descending;
treeList1.EndSort();
vb
Imports DevExpress.XtraTreeList.Columns
' ...
TreeList1.BeginSort()
TreeList1.Columns("Department").SortOrder = SortOrder.Ascending
TreeList1.Columns("Budget").SortOrder = SortOrder.Descending
TreeList1.EndSort()

See Also

BeginSort()

LayoutChanged()

Sorting

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace