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

  • Thread starter Thread starter dotnetnari
  • Start date Start date
D

dotnetnari

hi,

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




Thanks
 
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.
 
Back
Top