large xml file and tree view

H

happy.john1234

Hi, i have got large xml file which i have to show in tree view
windows form.I tried with loading all those data at once to tree view
but it took a long time to render that tree view.Now i am looking to
polpulate tree view selectively.Only populating those nodes that user
expands it by reading xml file.Can any one plz help me with some
suggestions or point out to some sample code(it would be better) on
how can i accomplish this.Thank in advance.
 
I

Ignacio Machin ( .NET/ C# MVP )

Hi, i have got large xml file which i have to show in tree view
windows form.I tried with loading all those data at once to tree view
but it took a long time to render that tree view.Now i am looking to
polpulate  tree view selectively.Only populating those nodes that user
expands it by reading xml file.Can any one plz help me with some
suggestions or point out to some sample code(it would be better) on
how can i accomplish this.Thank in advance.

Hi,

What you can do is define your custom enumerator , this is a great use
of the "yield return" feature of 2.0
you can detect when a node is opoening and theyn generate new nodes
below it as needed.

Also you need to make sure thatn the tree is displayed closed by
default.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top