Disables any redrawing of the tree view.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The preferred way to add items to a tree view control is to use the AddRange 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 method to prevent the TreeView control from painting during the add operations. To allow the control to resume painting, call the EndUpdate method when all the tree nodes have been added to the tree view.
The following code example displays customer information in a TreeView control. The root tree nodes display customer names, and the child tree nodes display the order numbers assigned to each customer. In this example, 1,000 customers are displayed with 15 orders each. The repainting of the TreeView is suppressed by using the and EndUpdate methods, and a wait Cursor is displayed while the TreeView creates and paints the TreeNode objects. This example requires that you have a Customer object that can hold a collection of Order objects. It also requires that you have a cursor file that is named MyWait.cur in the application directory and that you have created an instance of a TreeView control on a Form.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)