EDN Admin
Well-known member
In my windows form project (VS2010) I have a treeview object that is populated based upon a drop down selection.
Initially when I have one node populated in the treeview (at startup) it displays fine. If I navigate away from that (by selecting another option) which has multiple nodes and it renders fine.
When I go back to the selection that has a single node it does not display at all. If I double click in the area the node should be, the double click event fires. If I add a value as a second node, it renders correctly every time.
The treeview control is not bound to a datasource. It is built by looping through the data and then building the child nodes as it populates the parent.
This behavior exists only in the circumstance where I have only one parent node. I tried executing an expand all method which works if I have at least one child.
Again, this only occurs after making other selections. The initial startup uses this same selection and renders just fine.
For options 1 & 3, I always populate the child data. On options 2 & 4 I do not populate the child data until after the parent node has focus (in the interest of response time.)
My problem only occurs after executing options 2 or 4. I can cycle through 0,1 and 3 (zero being no selection) and everthing renders okay but once I execute 2 or 4 my problem starts to occur.
Any Ideas out there? <hr class="sig TMann
View the full article
Initially when I have one node populated in the treeview (at startup) it displays fine. If I navigate away from that (by selecting another option) which has multiple nodes and it renders fine.
When I go back to the selection that has a single node it does not display at all. If I double click in the area the node should be, the double click event fires. If I add a value as a second node, it renders correctly every time.
The treeview control is not bound to a datasource. It is built by looping through the data and then building the child nodes as it populates the parent.
This behavior exists only in the circumstance where I have only one parent node. I tried executing an expand all method which works if I have at least one child.
Again, this only occurs after making other selections. The initial startup uses this same selection and renders just fine.
For options 1 & 3, I always populate the child data. On options 2 & 4 I do not populate the child data until after the parent node has focus (in the interest of response time.)
My problem only occurs after executing options 2 or 4. I can cycle through 0,1 and 3 (zero being no selection) and everthing renders okay but once I execute 2 or 4 my problem starts to occur.
Any Ideas out there? <hr class="sig TMann
View the full article