Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Repositioning a selected node, then the selected node is set to the node where the repositioned node was.
posted

Hi all.  Before the update to the 2009, (latest April release), this worked fine.   I have a form where our users can construct a navigation tree for viewing documents (pdfs)  When they select a node with a mouse click or any other way, then press a button that fires off a Reposition of the node up or down.  After the reposition takes place, I clear the selected nodes, then use the getnodebykey (each node has a guid for key) to find the node and set it as selected.  In debug all looks great... the selected node is what is should be until I return focus back to the tree.  The tree thinks the selected node is 2 postion down.  This is constant on all repositioned nodes.  I have not changed any code, as mentioned earlier... this just started with the upgrade to the latest release.  Is this a know issue or has something changed I'm not aware of? or new process for repositioning nodes?

Thanks, Richard

May 20,2009

I think the problem is that my getnodebykey is getting overriden by something.  I can kind of reproduce this in the samples provided for the winform wintree.  "Drag n Drop".   When I select a node, then drag it up or down, then drop it, it is no longer the selected node but the node that currently holds it's previous position is the selected node.  I would expect the  "Drag n Drop"   node to be the currently selected node.  

Is there anyway to override this behavior?

I will try and produce some simple code to so this action with the repostion method and then reselect a node through the getnodebykey while in the a button_click event.