Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2006

Tip: Looking for answers? Try searching our database.

Is there a limit of number of nodes for a TreeView?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 21 Apr 2006 21:45 GMT
Hi,

I am using TreeView control from .Net Framework 1.1. Everything works if the
number of nodes is not too big.
When the number reaches thousands and the tree is fully expeanded ,  some
nodes(the nodes at the end) are missing.

Is there a limit for the number of nodes? If yes, how can I work around this
issue?

Thanks,
Chris
Kevin Yu [MSFT] - 24 Apr 2006 08:37 GMT
Hi Chris,

As far as I know, there isn't any limitation on the node count of TreeView.
If you add thousands of nodes to the TreeView, you can try to set a
breakpoint on the nodes loading code to check if the specific node has been
added to the tree node collection. Also, are the same nodes missing from
the treeview each time?

Kevin Yu
Microsoft Online Community Support

============================================================================
==========================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
============================================================================
==========================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Eugene Mayevski - 24 Apr 2006 09:44 GMT
Hello!
You wrote  on Mon, 24 Apr 2006 07:37:58 GMT:

KYM> As far as I know, there isn't any limitation on the node count of
KYM> TreeView. If you add thousands of nodes to the TreeView, you can try

Is .NET TreeView mapped to ComCtl32 treeview? The latter one has a limit of
65K nodes, if memory serves.

With best regards,
Eugene Mayevski
Chris - 26 Apr 2006 01:52 GMT
Thanks, that seems to be true.
I just added counting of nodes, it goes up to 95K nodes.
It seems I need to create my own tree view.

Thanks,
Chris

> Hello!
> You wrote  on Mon, 24 Apr 2006 07:37:58 GMT:
[quoted text clipped - 7 lines]
> With best regards,
> Eugene Mayevski
Tim Brooks - 30 Apr 2006 15:55 GMT
Chris,

You might also just have a paint update problem.  I'm sure you've looked at
this but  make sure you're halting screen updating with:

TreeView.BeginUpdate();
// ..Add nodes....
TreeView.EndUpdate();

...also, consider only loading nodes on demand.  This is a more acceptable
pracice for huge lists.  Trick is to load dummy nodes and them, when user
clicks on the parent, which is loaded, it replaces the dummy with the actual
next node.....look this one up on the internet.....scores of examples of how
to do it...

Good luck,
tim

> Hi,
>
[quoted text clipped - 8 lines]
> Thanks,
> Chris

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.