PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
TreeView nodes wouldn't clear
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
TreeView nodes wouldn't clear
![]() |
TreeView nodes wouldn't clear |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

