Hi,
I have a TreeView control with hierarchy:
A
| - B // source
| - C
D // dest
| - E
Whenever draging B in to D, Item B is removed and B is added into D node.
To implement this task, I ,firstly, write a simple MouseDown event to start
a drag-drop action:
private void tree_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
DragDropEffects dde1=DoDragDrop(s, DragDropEffects.All);
}
Which such simple methods, I do not expect my task is achieved. I just
expected that my tree-view acted normally. But what happend ?
When I click (not drag) the item B (or C or D), item B is chosen. But, when
I move the mouse (after I click the item) out of the treeview, the selected
node in the tree turns back to item A.
Is there any mistakes ? Can any one help me to make the tree view acting
normally ?
Thank in advanced. 2 12574
George Shepherd's Windows Forms FAQ contains an entry entitled:
How do I implement Drag and Drop support between two TreeViews?
Check it out at: http://www.syncfusion.com/faq/winforms/search/617.asp
=============================================
Clay Burch, .NET MVP
Syncfusion, Inc.
visit http://www.syncfusion.com for .NET Essentials
" #Hai" <Re**********@Mail.com> wrote in message
news:u5**************@TK2MSFTNGP12.phx.gbl... Hi, I have a TreeView control with hierarchy: A | - B // source | - C D // dest | - E
Whenever draging B in to D, Item B is removed and B is added into D node. To implement this task, I ,firstly, write a simple MouseDown event to
start a drag-drop action: private void tree_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { DragDropEffects dde1=DoDragDrop(s, DragDropEffects.All); } Which such simple methods, I do not expect my task is achieved. I just expected that my tree-view acted normally. But what happend ? When I click (not drag) the item B (or C or D), item B is chosen. But,
when I move the mouse (after I click the item) out of the treeview, the
selected node in the tree turns back to item A.
Is there any mistakes ? Can any one help me to make the tree view acting normally ?
Thank in advanced.
You can find the solution in http://longreat.com, or sutiable item for you.
" #Hai" <Re**********@Mail.com> ¦b¶l¥ó
news:u5**************@TK2MSFTNGP12.phx.gbl ¤¤¼¶¼g... Hi, I have a TreeView control with hierarchy: A | - B // source | - C D // dest | - E
Whenever draging B in to D, Item B is removed and B is added into D node. To implement this task, I ,firstly, write a simple MouseDown event to
start a drag-drop action: private void tree_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { DragDropEffects dde1=DoDragDrop(s, DragDropEffects.All); } Which such simple methods, I do not expect my task is achieved. I just expected that my tree-view acted normally. But what happend ? When I click (not drag) the item B (or C or D), item B is chosen. But,
when I move the mouse (after I click the item) out of the treeview, the
selected node in the tree turns back to item A.
Is there any mistakes ? Can any one help me to make the tree view acting normally ?
Thank in advanced.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Plumer |
last post by:
Hello everyone,
Yesterday I posted a message about implementing drag & drop in a TreeView
control.
I'm having real difficulty getting this to work -- the process seems to be
incredibly...
|
by: Kevin Henkener |
last post by:
I would like to be able to drag-n-drop System.Windows.Forms.TreeNode
objects between two different applications (actually the same
application, just two instances of it) in C#. I've seen posts in...
|
by: Norbert Heidbüchel |
last post by:
Hi all,
I have read a lot of postings and web pages about drag and drop
and treeviews, but could not find an answer to my problem. Sorry, if I
missed something.
I am trying to drag and drop...
|
by: Qingdong Z. |
last post by:
I have a VS.NET windows application which use drag-drop feather. It works
fine when application start, but stops working after application run one or
two days. The application is related to Video...
|
by: emferrari |
last post by:
Hi everybody
I have two treeviews, one of them is only to receive items dragged from
the treeview1. I want to know how to drag a full node information to
the treeview2. I know how to do that...
|
by: Terry Olsen |
last post by:
My first time using TreeViews. I have TreeView1 set up to display my
directory structure just like Windows Explorer. I can drag & drop files and
folders over to TreeView2. I can re-arrange the...
|
by: pooja |
last post by:
i need to implement drag and drop in treeview in VB.
Kindly help.
My treeview contains activities maintained using XML Files.
Hopefully, Thanks.
|
by: timnels |
last post by:
I have created a muti-select treeview control. Problem is I am now
trying to implement drag/drop in the application that uses it. It
seems the mouse down and mouse move events fire before the...
|
by: munishbatra2002 |
last post by:
hi all,
we are using a gridview and a treeview control ...
we want to drag a row from gridview control and drop it onto treeview
control on a web page...
we are using C# ASP.NET ...
can anyone...
|
by: bob |
last post by:
Hi all,
I have a treeview that has drag drop.
Works well enough but...
If you drag out of bounds of the treeview the nodrop icon comes on.
Fair enough.
But when I move back inside the treeview...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |