Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView control causes timeout issue

Status
Not open for further replies.

NatGreen

Programmer
Apr 19, 2002
90
US
All,

I am using a Microsoft.Web.UI.WebControls.TreeView control on my webform and it works great except when I have a large amount of data to display. At times I can have up to 30,000 nodes to display, which causes a timeout issue becuase it takes to long to display.

Does anyone have a suggestion on how to get around this?

Thanks for your help!
NatGreen
 
Hey Nat,

We dropped the tree view in favour of the aspnetmenu before we could play with this functionality, but just to throw this out to you that it is possible:

you can load only bits of the treeview at a time.

i.e. here's a tree view with 3 nodes, and each node has a few items beneath it:

TreeNode1
TreeNode2
TreeNode3

Now, at this point, only 3 nodes are actually loaded. When the user selects one (lets say TreeNode2) then the control goes and gets the next level UNDER THAT NODE

TreeNode1
TreeNode2
TreeNode2.1
TreeNode2.2
TreeNode2.3
TreeNode3

You can write code so the tree view will always work this way: only loading nodes when they are requested. That way, you won't have to load all 30k of them.

Now, how to do this? We never got that far. But it CAN be done. I'd suggest looking into that a bit more
:)

hth

D
 
Thanks. We have already attempted adding another level to our tree but our user are not particulary fond of the idea, but it looks as if it may be our only solution.

Reagrds,
Natalee
 
:O

You mean all 30k nodes are at the root level?!?!

nasty. Yeah, hopefully they'll go for sub-levels

D
 
No we have two level currently, we tried adding a 3rd level and they didn't go for it. :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top