drag and drop between a tree view and a group bar

I am attempting to create a form that consists of a tree view (TreeViewAdv) and a Group bar. I want the user to be able to drag from the Tree View to the Group Bar.

Can this be done?

3 Replies

RC Rajesh C Syncfusion Team May 30, 2007 06:48 PM UTC


Hi Kevin,

You can drag a item from the TreeViewAdv to the Group Bar using TreeNodeAdv's ItemDrag event handler. Please refer to the following code snippets which illustrates the same:

[ C# ]

private void treeNodeAdv1_ItemDrag(object sender, ItemDragEventArgs e)
{
GroupViewItem item = new GroupViewItem(((TreeNodeAdv[])e.Item)[0].Text.ToString(), 0);
DataObject dtaobject = new DataObject(GroupView.GroupViewFormatName, item);
this.treeNodeAdv1.DoDragDrop(dtaobject, DragDropEffects.All);
}

Please have a look at this sample and let me know if this helps you.

http://websamples.syncfusion.com/samples/Tools.Windows/F61658/Main.htm

Thank you for using Syncfusion products.

Regards,
Rajesh C


KW kevin wilson January 14, 2008 09:24 PM UTC

Would you have a VB sample?

>
Hi Kevin,

You can drag a item from the TreeViewAdv to the Group Bar using TreeNodeAdv's ItemDrag event handler. Please refer to the following code snippets which illustrates the same:

[ C# ]

private void treeNodeAdv1_ItemDrag(object sender, ItemDragEventArgs e)
{
GroupViewItem item = new GroupViewItem(((TreeNodeAdv[])e.Item)[0].Text.ToString(), 0);
DataObject dtaobject = new DataObject(GroupView.GroupViewFormatName, item);
this.treeNodeAdv1.DoDragDrop(dtaobject, DragDropEffects.All);
}

Please have a look at this sample and let me know if this helps you.

http://websamples.syncfusion.com/samples/Tools.Windows/F61658/Main.htm

Thank you for using Syncfusion products.

Regards,
Rajesh C



FS Fathima Shalini P Syncfusion Team January 15, 2008 09:14 AM UTC

Hi Kevin,

Please find the VB sample in the following link:

http://websamples.syncfusion.com/samples/Grid.Windows/F61658_VBFile/main.htm

Please let me know if any concerns.

Regards,
Fathima


Loader.
Up arrow icon