I'm essentially using the treeview to show my data structure on the
left, whilst having a more detailed view (using textboxes etc) on the
right of my form. There are times when I am trying to prevent the user
moving away from a selected node until they have met my validation
criteria.
OnBeforeSelectNode sort of works, but I've noticed that
the advTreeView.SelectedNode still changes when ACanSelect is set to
false (even if it isn't highlighted).
Using the example of:
Mercedes:
- SLS
- SLK
- GLA
Where
for this example, once SLS is selected the user cannot select another
node (my real code is more complex and the user can move once the
validation has been met). If the user selects SLK, ACanSelect is set to
false, there are no highlighted nodes, but SLK has a dotted line around
it, AdvTreeView.SelectedNode equals SLK and when I press down on the
keyboard it goes to GLA (which is one down from SLK). It appears that
SLK is selected all but visually.