I have created a parent-child-grandparent treeview with checkboxes.
When I check/uncheck the parent node I want all the child and grandchildren nodes to check/uncheck.
I did this in the treeview_AfterCheck event:
for each nod as treenode in e.node.nodes
nod.checked = e.node.checked
next
At first this seemed to work perfectly but if I rapidly check/uncheck the parent node in the UI the parent and children nodes go out of sync! It possibly has something to do with the fact that the _AfterCheck event is called everytime I programatically check each child node?
What gives? Surely there is a way to handle this correctly?
Thanks in advance...
When I check/uncheck the parent node I want all the child and grandchildren nodes to check/uncheck.
I did this in the treeview_AfterCheck event:
for each nod as treenode in e.node.nodes
nod.checked = e.node.checked
next
At first this seemed to work perfectly but if I rapidly check/uncheck the parent node in the UI the parent and children nodes go out of sync! It possibly has something to do with the fact that the _AfterCheck event is called everytime I programatically check each child node?
What gives? Surely there is a way to handle this correctly?
Thanks in advance...