drag and drop from treeview into datatable using windowsapplication in c#

D

dotnetnari

hi,

How to Drag and drop the nodes from treeview into datatable
columns using windowsapplication in c#




Thanks
 
A

Alberto Poblacion

dotnetnari said:
How to Drag and drop the nodes from treeview into datatable
columns using windowsapplication in c#

1) In the treeview, implement the ItemDrag event and execute DoDragDrop
passing as an argument the value of the dragged item.
2) In the destination control (which should have the property
AllowDrop=true) implement the DragOver event and set
e.Effect=DragDropEffects.Copy.
3) In the DragDrop event of the destination control, extract the dropped
data with e.Data.GetData(...) and insert it into your datatable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top