Is there a programatic way to ensure that a parent node can only have 1 checked child? For instance, consider the following tree:
Marital Status
Single
Married
So if you click Single the code will ensure that the Married not will not be checked. Much like a radio buttons...
Any ideas?
i tried to do something like this to put some additional logic so that it does not keep firing but it does not work:
XamDataTree1_NodeCheckedChanged
'Do Code.....
Works with the delivered control... looking like i may have to use TreeView
S-
THis looks better but the CheckMode is set to manual.... and is not checking the parent. THis is where the issue occurs because you end up in this loop that you cant get out of.
THere really should be another event that only fires for the node that is checked. Right now if it is set to AUTO it checks from the top most parent down so you have no idea which node was actually checked.
Hello Aaron,
I have modified the sample I sent you before, so now it works as you want.
Hope this helps you.
Stefan actually what i want is if the user checks a node, then decides to check another one.... the original node will be unchecked and the new node will be checked.
when i go to uncheck all nodes the NodeCheckChange event fires until i get a stackoverflow....
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I handled the NodeCheckedChanged event and uncheck the CheckBox if there is another item already checked.. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.