Hi!
In my windows application I need to add some nodes to a node of a treeview, which number depends on what user enters in the node label. For example: if user edits the label of a node and digits "1-1000", I have to add 1000 nodes to the parent nodes.To do this, Iread the label, calculate the number of nodes and then add them to the parent node. This is a part of code:
e.Node.TreeView.BeginUpdate();
for (int i = 0; i < 3000; i++)
e.Node.Nodes.Add(i.ToString());
e.Node.TreeView.EndUpdate();
The treeview repaintingwas very slow, so I have tried to do the same thing, but out of AfterLabelEdit event handler (I created the nodes after a DoubleClick over a node). The result is thattreeview repaintingis more fast. Why?