MJ
Mano J
Syncfusion Team
August 10, 2009 07:08 AM UTC
Hi Scott,
Please check the code snippet below to drag a GroupViewItem and drop into a TreeView.
this.groupView1.AllowDragDrop = true;
this.treeView1.AllowDrop = true;
private void treeView1_DragEnter(object sender, DragEventArgs e)
{
e.Effect = DragDropEffects.Move;
}
private void treeView1_DragDrop(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent("GroupViewItemDataFormat"))
{
object data = e.Data.GetData("GroupViewItemDataFormat");
if (data != null)
{
treeView1.Nodes.Add(((GroupViewItem)data).Text);
}
}
}
Please let me know if you have any questions.
Best Regards,
Mano