We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Drag And Drop from Syncfusion Treeview to Syncfusion Treeview

Thread ID:

Created:

Updated:

Platform:

Replies:

35980 Oct 18,2005 01:20 AM UTC Oct 19,2005 11:30 AM UTC WinForms 1
loading
Tags: Tools
Tim Harrington
Asked On October 18, 2005 01:20 AM UTC

The examples I''ve seen on your website all seem to describe dragging and dropping between a Microsoft treeview control and a syncfusion control. My question is what would the code look like in the DragDrop Event if I was dragging a node from a syncfusion tree to another syncfusion tree and all I wanted to do was insert a new node in the treeview WITHOUT deleting/moving the node in the original treeview. I want the new node to have the EXACT same label as the original node and cannot figure out how to access the text value of the original node. Here is a snippet of code within the DragDrop event (taken from your examples).It does not seem to work except if you are dropping the new node onto a Microsoft treeview control. The value of e is always null in the treeview. Here is the code for the tree which is receiving the new node: Take a look at my dragdrop and comment on what is wrong: private void tvLeads_DragDrop(object sender, System.Windows.Forms.DragEventArgs e) { TreeViewAdv treeViewAdv = sender as TreeViewAdv; Point ptInTreeadv = treeViewAdv.PointToClient(new Point(e.X, e.Y)); TreeNodeAdv destinationNodeAdv = treeViewAdv.GetNodeAtPoint(ptInTreeadv); TreeNode sourcenode = e.Data.GetData(typeof(System.Windows.Forms.TreeNode))as TreeNode; TreeNodeAdv dragnode = new TreeNodeAdv(); dragnode.Text = sourcenode.Text; destinationNodeAdv.Nodes.Add(dragnode); destinationNodeAdv.Expand(); }

Deepa TS [Syncfusion]
Replied On October 19, 2005 11:30 AM UTC

Hi timjax, Please take a look at this sample which reproduces your problem.. tree drag drop And let me know if this meets your requirement. Thanks for your interest in Syncfusion products Thanks for your patience. Regards, Deepa.T.S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;