PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework TreeView nodes wouldn't clear

Reply

TreeView nodes wouldn't clear

 
Thread Tools Rate Thread
Old 06-09-2006, 10:56 PM   #1
jnospamster@gmail.com
Guest
 
Posts: n/a
Default TreeView nodes wouldn't clear


I had about 4 hours of frustration with the TreeView control today. I
thought it must have been a bug in the TreeView, but who knows.

Basically calling treeView's Nodes.Clear() did not clear out the
treeView. When looking at the treeView in the debugger, the Nodes
collection showed a count of 0, but the treeView still showed the old
nodes in the app. When I looked harder, there was a non-public member
called nodeTable. This table was not cleared by Nodes.Clear().

So eventually I tried to create a standalone program that duplicated
this problem, but of course the problem was no longer there. I'm
pretty sure that closing the solution and opening it again was what
fixed it because my main application's tree view is now working as
desired. I just wish I'd tried closing VS and opening it again 3 hours
earlier.

I hope this post helps someone some day.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off