Gotta love this TreeView "Feature"!! (RESOLVED-ISH)
Hello all. Yes, you are gonna love this one. First time I have come accross it, and to me it seems REALLY bizarre....
I have attached the project so you can test this too.
Basically I have a treeview, bound to an imagelist with two icons in it. One green ball and one red ball. The treeview has checkboxes in it.
It is supposed to be a simple permissions tree. Check a node, you get that permission and the icon goes green. Uncheck it, permission is denied and the icon goes red. In addition to this, when I check a node, I check all children of the parent to see if all are green. Then I check the parent and make it green as well.
Similarly, I check for red as well, and take the correct action.
All sounds easy enough yes?
Well no!
The above works for all the nodes except one. To make a node "inactive" click on the icon. It switches the icon to the alternate one and then the code to check all the others no longer works! I didn't even know you could click a treeview icon and something happens!
Have a play with this and see if you can see something really bad I have done here :/ I hope so, then it means it's fixable! If not, let me know too!