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
215
UltraTree DragDrop event
posted

I am working on drag & drop nodes within the tree.

private void UltraTree1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{

}

I know how to find the nodes that are dragged.

            SelectedNodes = (SelectedNodesCollection)e.Data.GetData(typeof(SelectedNodesCollection));

How do I find the node that was dropped on?

 

Parents
No Data
Reply
  • 69832
    Suggested Answer
    Offline posted

    There is a sample included with the SDK, 'UltraTree Drag and Drop', that demonstrates this concept. TO answer the question, the control's GetNodeFromPoint method; note that since that method's e.X/e.Y properties are expressed in screen coordinates , you need to use the PointToClient method to convert them to client coordinates before passing them to the GetNodeFromPoint method.

Children
No Data