I am trying to get all checked items from the TreeView.
My problem is this:
i am using MyTelerikTree.CheckedItems to get a list of all the checked elements in the tree.
my tree has a 3 level deep hierarchy, and i am only interested in the checked items of the deepest level.
if the tree was never expended i only get the root element as "Checked"
I assume this is happening because the tree is using virtual elements created on the fly.
Now, if the root element is fully checked, then it would be safe to assume all children are selected, and that's fine.
However, if i select just one of the branches or leaves in the tree (so that the root is partially checked) i get it as part of the CheckedItems list.
This would have been fine as well if the tree was not vitrualizing - i could have simply looked at the deepest checked level.
the problem is that if the tree is collapsed and i check the root, i only get the root on the CheckedItems.
If i treat a checked element as if all it's children are checked, i will sometimes add unchecked elements
If i treat only checked elements as checked (and not the children) i will miss the checked children..
So my question is - how do i bridge these conflicting issues?