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.
Unfortunately, activation email could not send to your email. Please try again.

Drag Drop from TreeViewAdv to EditControl

Thread ID:

Created:

Updated:

Platform:

Replies:

68190 Sep 11,2007 01:34 PM Sep 13,2007 04:10 PM Windows Forms 2
loading
Tags: Tools
Allie
Asked On September 11, 2007 01:34 PM

I was wondering how to drag and drop from a TreeViewAdv control to an EditControl. I currently have the EditControl set to allow file drop. What else do I need to do?

Jisha Joy [Syncfusion]
Replied On September 13, 2007 08:47 AM

Hi Allie,

Drag and Drop of TreeViiewAdv nodes is possible by using the ItemDrag event of editcontrol.Below is the sample code snippet for your reference:

//ItemDrag EventHandler
private void treeViewAdv1_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e)
{

TreeViewAdv treeViewAdv = (TreeViewAdv)sender;
TreeNodeAdv[] nodes = (TreeNodeAdv[])e.Item;
TreeNodeAdv node = nodes[0];
this.treeViewAdv1.DoDragDrop(node.Text, DragDropEffects.All);

}

Please refer to the attached sample that illustrates the same:
http://websamples.syncfusion.com/samples/Tools.Windows/F68190/main.htm

Please try with the above details and let me know if you have any questions.

Regards,
Jisha

Allie
Replied On September 13, 2007 04:10 PM

That works, thank you!

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.

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.

;