Displaying large amount of data in a Treeview

  • Thread starter Thread starter Danny Liberty
  • Start date Start date
D

Danny Liberty

Hi,

I would like to display a large amount of data stored in a file (100Mb
or higher) in a treeview control.
It would be very inefficient to preload all the data into the treeview
since it would take an extremely long time to load the form and it
would also consume a large amount of memory.
My question is what would be an appropriate solution? I could use a
memory map and then override the MouseClick to load only a batch of
items each time the control is scrolled through, but it seems a rather
awkward solution...

Thanks in advance,

Danny
 
I dont think anyone can answer your question unless you are a 'little'
more specific with what kind of data you are dealing with. Is it an
XML document? This type of problem sounds like something that could be
handled by formating your data into XML and parsing out only what you
need.
 
Well, rather than "when the control is scrolled through", it would be "when
a node is expanded". Also you would have to verifiy those childs nodes to
see if they have childs.
If so, you could add it a dummy node, and then when the parent node is
expanded, do the same. It's something like MSDN library tree
 
The type of data is irrelevant. I'm using a custom binary formatter to
serialize to a file a collection of objects. Each object has a few
fields that need to be displayed in the tree view in some type of
hierarachy (I can go into details but I think it's irrelevant). My
problem is not how to read the data or deserialize it, rather just
displaying it. To be more precise, the data would eventually be just a
string per each tree node.

I know I can also use the solution of loading the data "on expand" but
again, in some situations there would be too much data to even load the
first level of the tree (that is only the root nodes without the sub
nodes).
 
take a look at www.obout.com. I have not used his .net controls but I have
used his TreeView control for ASP classic. It loads very fast, and if you
want it to it will load a node only after you have clicked on it. It takes
care of all the plumbing.

Their support is good too.
 
Take a look at Infralution's Virtual Tree. It does exactly what you
want and will only load nodes in each level when they are actually
required to support the displayed data. This enables it to handle
display of huge data sources.

Your can get more information and download a trial version from:

www.infralution.com/virtualtree.html

This functionality would be extremely difficult to build using the
standard windows tree view and really requires a control written from
scratch - which is a very large task.

Regards
Grant Frisken
Infralution
 
Shawn said:
take a look at www.obout.com. I have not used his .net controls but I have
used his TreeView control for ASP classic. It loads very fast, and if you
want it to it will load a node only after you have clicked on it. It takes
care of all the plumbing.

Their support is good too.
 
Great control, exactly what I was looking for.
I've already requested the control be purchase by my company, thank
you!
 
Back
Top