System.Windows.Forms.TreeView.BeginUpdate Method

Disables any redrawing of the tree view.

Syntax

public void BeginUpdate ()

Remarks

To maintain performance while items are added one at a time to the System.Windows.Forms.TreeView, call the TreeView.BeginUpdate method. The TreeView.BeginUpdate method prevents the control from painting until the TreeView.EndUpdate method is called.

The preferred way to add items to a tree view control is to use the TreeNodeCollection.AddRange(TreeNode[]) method to add an array of tree node items to a tree view. However, if you want to add items one at a time, use the TreeView.BeginUpdate method to prevent the System.Windows.Forms.TreeView control from painting during the add operations. To allow the control to resume painting, call the TreeView.EndUpdate method when all the tree nodes have been added to the tree view.

Requirements

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