System.Windows.Forms.TreeView.Sorted Property

Gets or sets a value indicating whether the tree nodes in the tree view are sorted.

Syntax

[System.ComponentModel.DefaultValue(false)]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
[System.ComponentModel.Browsable(false)]
public bool Sorted { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When TreeView.Sorted is set to true, the System.Windows.Forms.TreeNode objects are sorted in alphabetical order by their TreeNode.Text property values. You should always use TreeView.BeginUpdate and TreeView.EndUpdate to maintain performance when you add a large quantity of items to a sorted System.Windows.Forms.TreeView. When the text of an existing node is changed, you must call TreeView.Sort to resort the items.

Note:

The default sorter uses the System.Globalization.CompareInfo.Compare(string, int, int, string, int, int) method based on the Application.CurrentCulture specified by the application. This means that System.Windows.Forms.TreeNode objects with equal value are kept in the order in which they were added to the System.Windows.Forms.TreeView control.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0