Kevin -
I have a number of comments on this topic, having asked the same question
myself on several different occasions.
First of all the clear answer is NO. You would never want to load that many
nodes into the tree control. I remember clearly back in VB6 land that the
tree control would bog down after only adding several thousand nodes. I
think it's a bit better in .NET, but not much.
There are a couple of third party controls out there that are much better
designed to handle hundreds of thousands of nodes much faster.
BUT... all that having been said, I would turn this around on you, (as I did
to myself) and ask the question, "What are you thinking????" A MILLION
nodes? What kind of application requires the display of so many nodes at
once, and even if you could, do you really want your user having to go
through that many nodes to get where he or she wants?
Which direction are the millions of nodes? Is there a million nodes under
the root (vertical build) or does each node have ten nodes that has ten nodes
that has ten nodes, etc... (horizontal build)?
If it is a vertical build, I don't think a tree node is the right tool. If
it is a horizontal build, then I would recommend the solution I ended up
using and that is to only fetch the child nodes when the branch is
expanded... That way you are not wasting all those resources for all the
millions of nodes that will never get looked at.
Hope this helps! Good luck from a guy that's "been there, done that."
-Zorpy