Performance in Windows Forms MultiColumn TreeView

28 Apr 20211 minute to read

The performance of the MultiColumnTreeView can be improved by using the following properties and methods.


When the SuspendExpandRecalculate property is set to true, the populating time nearly reduces to half of its original time by recalculating the nodes maximum height while expanding and collapsing.
The unnecessary calling of Recalculate dimensions for the child nodes when the Root nodes are collapsed is also reduced.

this.multiColumnTreeView1.SuspendExpandRecalculate = true;
Me.multiColumnTreeView1.SuspendExpandRecalculate = True

The below methods can be used to temporarily stop painting of nodes and new nodes can be added to the control in between these methods

MultiColumnTreeView Methods Description
BeginUpdate Calling this method will stop the redraws of the control and makes the node addition faster than normal.
EndUpdate Resumes the painting of the control suspended by BeginUpdate method.

//Add more node here


' Add more node here